-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
113 changed files
with
4,940 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6.41 | ||
6.42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use Illuminate\Queue\SerializesModels; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Console\Command; | ||
use App\Models\LandingPage; | ||
use Illuminate\Support\Facades\Artisan; | ||
|
||
class UpdateLandingPage | ||
{ | ||
use Dispatchable; | ||
use InteractsWithSockets; | ||
use SerializesModels; | ||
|
||
public $item; | ||
public $urls = []; | ||
|
||
public $output; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct(LandingPage $item) | ||
{ | ||
$this->item = $item; | ||
|
||
if ($item->is_published) { | ||
$landingPageModel = LandingPage::byId($item->id)->first(); | ||
|
||
if ($landingPageModel) { | ||
$this->urls = [ | ||
'/' . $landingPageModel->slug, | ||
]; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\API; | ||
|
||
class LandingPagesController extends BaseController | ||
{ | ||
protected $model = \App\Models\LandingPage::class; | ||
protected $transformer = \App\Http\Transformers\LandingPageTransformer::class; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
app/Http/Controllers/Admin/LandingPageCategoryController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Admin; | ||
|
||
use A17\Twill\Http\Controllers\Admin\ModuleController; | ||
|
||
class LandingPageCategoryController extends ModuleController | ||
{ | ||
protected $moduleName = 'landingPageCategories'; | ||
|
||
protected $indexOptions = [ | ||
'publish' => false, | ||
'editInModal' => true, | ||
'permalink' => false, | ||
]; | ||
|
||
protected $titleColumnKey = 'name'; | ||
|
||
protected $indexColumns = [ | ||
'name' => [ | ||
'title' => 'Name', | ||
'edit_link' => true, | ||
'field' => 'name', | ||
], | ||
]; | ||
|
||
protected $defaultOrders = [ | ||
'name' => 'asc', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Admin; | ||
|
||
use A17\Twill\Http\Controllers\Admin\ModuleController; | ||
use App\Repositories\LandingPageRepository; | ||
use App\Models\LandingPageType; | ||
use Session; | ||
|
||
class LandingPageController extends ModuleController | ||
{ | ||
protected $moduleName = 'landingPages'; | ||
|
||
protected $indexColumns = [ | ||
'title' => [ | ||
'title' => 'Title', | ||
'edit_link' => true, | ||
'sort' => true, | ||
'field' => 'title', | ||
], | ||
]; | ||
|
||
protected $indexWith = []; | ||
|
||
protected $defaultOrders = []; | ||
|
||
protected $previewView = 'site.landingPageDetail'; | ||
|
||
protected function indexData($request) | ||
{ | ||
$types = LandingPageType::all()->pluck('page_type', 'id')->toArray(); | ||
$typesOptions = $this->getTypesOptions($types); | ||
|
||
return [ | ||
'types' => $types, | ||
'typesOptions' => $typesOptions, | ||
]; | ||
} | ||
|
||
protected function formData($request) | ||
{ | ||
$types = LandingPageType::all()->pluck('page_type', 'id')->toArray(); | ||
$typesOptions = $this->getTypesOptions($types); | ||
|
||
$baseUrl = '//' . config('app.url') . '/'; | ||
|
||
return [ | ||
'types' => $types, | ||
'typesOptions' => $typesOptions, | ||
'baseUrl' => $baseUrl, | ||
]; | ||
} | ||
|
||
public function getTypesOptions($types) | ||
{ | ||
$list = []; | ||
|
||
foreach ($types as $value => $label) { | ||
$list[] = ['value' => $value, 'label' => $label]; | ||
} | ||
|
||
return $list; | ||
} | ||
protected function getRoutePrefix() | ||
{ | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.