api
This commit is contained in:
parent
e1ebe1b550
commit
0ba126f093
|
|
@ -66,7 +66,10 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"preferred-install": "dist"
|
"preferred-install": "dist",
|
||||||
|
"allow-plugins": {
|
||||||
|
"composer/installers": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"prefer-stable": true
|
"prefer-stable": true
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ return [
|
||||||
'host' => 'localhost',
|
'host' => 'localhost',
|
||||||
'port' => 3306,
|
'port' => 3306,
|
||||||
'database' => 'airport2023',
|
'database' => 'airport2023',
|
||||||
'username' => 'root',
|
'username' => 'shohrat',
|
||||||
'password' => 'bt110226',
|
'password' => 'bt110226',
|
||||||
'charset' => 'utf8mb4',
|
'charset' => 'utf8mb4',
|
||||||
'collation' => 'utf8mb4_unicode_ci',
|
'collation' => 'utf8mb4_unicode_ci',
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,116 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace AhmadFatoni\ApiGenerator\Controllers\API;
|
||||||
|
|
||||||
|
use Cms\Classes\Controller;
|
||||||
|
use BackendMenu;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use AhmadFatoni\ApiGenerator\Helpers\Helpers;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use tps\Airport\Models\Content;
|
||||||
|
use tps\Airport\Models\Menu;
|
||||||
|
|
||||||
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
|
use RainLab\Translate\Behaviors\TranslatableModel;
|
||||||
|
use Config;
|
||||||
|
use RainLab\Blog\Models\Post;
|
||||||
|
use DB;
|
||||||
|
|
||||||
|
class postController extends Controller
|
||||||
|
{
|
||||||
|
protected $Content;
|
||||||
|
|
||||||
|
protected $helpers;
|
||||||
|
|
||||||
|
public function __construct(Content $Content, Helpers $helpers)
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->Content = $Content;
|
||||||
|
$this->helpers = $helpers;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function validateForm($data, $rules)
|
||||||
|
{
|
||||||
|
return Validator::make($data, $rules);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(Request $request)
|
||||||
|
{
|
||||||
|
$dataVal = $request->all();
|
||||||
|
|
||||||
|
|
||||||
|
$data = Post::with(['categories:id,name', 'featured_images'])
|
||||||
|
->where('published', 1)
|
||||||
|
->select('id', 'title', 'published_at', 'slug', 'excerpt')
|
||||||
|
->orderBy('published_at', 'desc')
|
||||||
|
->with('views')
|
||||||
|
->paginate($dataVal["per_page"] ?? 6);
|
||||||
|
|
||||||
|
|
||||||
|
//$data->translateContext($dataVal["locale"]);
|
||||||
|
if($data){
|
||||||
|
$data->each(function ($item, $key) use($dataVal) {
|
||||||
|
$item->translateContext($dataVal["locale"] ?? 'ru');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($data) != 0) {
|
||||||
|
// return $this->helpers->apiArrayResponseBuilder(200, 'success', $data);
|
||||||
|
return response()->json($data, 200);
|
||||||
|
} else {
|
||||||
|
return $this->helpers->apiArrayResponseBuilder(404, 'not found data', []);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getPost(Request $request, $id)
|
||||||
|
{
|
||||||
|
$dataVal = $request->all();
|
||||||
|
|
||||||
|
$data = Post::with(['categories:id,name', 'featured_images'])
|
||||||
|
->select('id', 'title', 'published_at', 'slug', 'excerpt', 'content_html')
|
||||||
|
->with('views')
|
||||||
|
->find($id);
|
||||||
|
|
||||||
|
|
||||||
|
if($data){
|
||||||
|
$obj = Db::table('vdomah_blogviews_views')
|
||||||
|
->where('post_id', $id);
|
||||||
|
|
||||||
|
if ($obj->count() > 0) {
|
||||||
|
$row = $obj->first();
|
||||||
|
|
||||||
|
// $views = $row->views + rand(1,10);;
|
||||||
|
|
||||||
|
$views = $row->views + 1;;
|
||||||
|
|
||||||
|
$obj->update(['views' => $views]);
|
||||||
|
// $data['views'] = $row->views;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
Db::table('vdomah_blogviews_views')->insert([
|
||||||
|
'post_id' => $data->getKey(),
|
||||||
|
'views' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
//$data['views'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$data->translateContext($dataVal["locale"] ?? 'ru');
|
||||||
|
|
||||||
|
return response()->json($data, 200);
|
||||||
|
//return $this->helpers->apiArrayResponseBuilder(200, 'success', [$data]);
|
||||||
|
}else{
|
||||||
|
|
||||||
|
return $this->helpers->apiArrayResponseBuilder(404, 'not found data', []);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -9,6 +9,7 @@ use Illuminate\Http\Request;
|
||||||
use AhmadFatoni\ApiGenerator\Helpers\Helpers;
|
use AhmadFatoni\ApiGenerator\Helpers\Helpers;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use tps\Airport\Models\Content;
|
use tps\Airport\Models\Content;
|
||||||
|
use tps\Airport\Models\Menu;
|
||||||
use Config;
|
use Config;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -32,15 +33,16 @@ class sectionController extends Controller
|
||||||
|
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$path = 'http://localhost:8000' . Config::get('cms.storage.media.path');
|
$path = 'http://216.250.8.104:8081' . Config::get('cms.storage.media.path');
|
||||||
|
|
||||||
$data = $request->all();
|
$dataVal = $request->all();
|
||||||
|
|
||||||
$rules = [
|
$rules = [
|
||||||
'page' => 'required',
|
'page' => 'required',
|
||||||
|
//'locale' => 'required'
|
||||||
];
|
];
|
||||||
|
|
||||||
$validator = $this->validateForm($data, $rules);
|
$validator = $this->validateForm($dataVal, $rules);
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
return $this->helpers->apiArrayResponseBuilder(400, 'fail', $validator->errors());
|
return $this->helpers->apiArrayResponseBuilder(400, 'fail', $validator->errors());
|
||||||
}
|
}
|
||||||
|
|
@ -54,15 +56,43 @@ class sectionController extends Controller
|
||||||
$dataq = json_decode($data);
|
$dataq = json_decode($data);
|
||||||
|
|
||||||
for ($i = 0; $i < count($data[0]->data); $i++) {
|
for ($i = 0; $i < count($data[0]->data); $i++) {
|
||||||
if ($dataq[0]->data[$i]->section_id != null) {
|
if ($dataq[0]->data[$i]->section_id != null && $dataq[0]->data[$i]->flight_type == 0) {
|
||||||
$modified = $dataq[0]->data[$i]->section::where('id', $dataq[0]->data[$i]->section_id)->with('translations:locale,model_id,attribute_data')->first();
|
$modified = $dataq[0]->data[$i]->section::where('id', $dataq[0]->data[$i]->section_id)->first();
|
||||||
|
|
||||||
|
$modified->translateContext($dataVal["locale"] ?? 'ru');
|
||||||
|
|
||||||
$modified->makeHidden(['created_at', 'updated_at', 'deleted_at']);
|
$modified->makeHidden(['created_at', 'updated_at', 'deleted_at']);
|
||||||
$contents = array_merge($contents, array($modified));
|
$contents = array_merge($contents, array($modified));
|
||||||
// dump($testq);
|
// dump($testq);
|
||||||
} else {
|
}
|
||||||
$modified = $dataq[0]->data[$i]->section::select('id', 'title', 'slug', 'excerpt', 'published_at', 'type')->orderBy('published_at', 'desc')->limit($dataq[0]->data[$i]->limit)->with('translations:locale,model_id,attribute_data')->get();
|
else if($dataq[0]->data[$i]->flight_type == 1 && $dataq[0]->data[$i]->section_id == null){
|
||||||
|
$modified = $dataq[0]->data[$i]->section::where('type_flight', input("flight_type"))->first();
|
||||||
|
|
||||||
|
$modified->translateContext($dataVal["locale"] ?? 'ru');
|
||||||
$contents = array_merge($contents, array($modified));
|
$contents = array_merge($contents, array($modified));
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
$modified = $dataq[0]->data[$i]->section::select('id', 'title', 'slug', 'excerpt', 'published_at', 'type')
|
||||||
|
->orderBy('published_at', 'desc')
|
||||||
|
->limit($dataq[0]->data[$i]->limit)
|
||||||
|
->with(['featured_images'])
|
||||||
|
->with('views')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
|
||||||
|
if($modified){
|
||||||
|
$modified->each(function ($item, $key) use($dataVal) {
|
||||||
|
$item->translateContext($dataVal["locale"] ?? 'ru');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$post_section = array(
|
||||||
|
"type"=> "post",
|
||||||
|
"posts"=> $modified
|
||||||
|
);
|
||||||
|
$contents = array_merge($contents, array($post_section));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$data[0]->section_contents = $contents;
|
$data[0]->section_contents = $contents;
|
||||||
|
|
||||||
|
|
@ -74,4 +104,29 @@ class sectionController extends Controller
|
||||||
return $this->helpers->apiArrayResponseBuilder(404, 'not found data', []);
|
return $this->helpers->apiArrayResponseBuilder(404, 'not found data', []);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function getMenu(Request $request)
|
||||||
|
{
|
||||||
|
$dataVal = $request->all();
|
||||||
|
|
||||||
|
$data = Menu::select('id', 'name', 'sub_menu', 'order', 'menu_slug', 'status')
|
||||||
|
->orderBy('order', 'asc')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
if (count($data) != 0) {
|
||||||
|
|
||||||
|
|
||||||
|
$data->each(function ($item, $key) use($dataVal) {
|
||||||
|
$item->translateContext($dataVal["locale"] ?? 'ru');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
return $this->helpers->apiArrayResponseBuilder(200, 'success', $data);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return $this->helpers->apiArrayResponseBuilder(404, 'not found data', []);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,8 @@ Route::post('fatoni/generate/api', array('as' => 'fatoni.generate.api', 'uses' =
|
||||||
Route::post('fatoni/update/api/{id}', array('as' => 'fatoni.update.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@updateApi'));
|
Route::post('fatoni/update/api/{id}', array('as' => 'fatoni.update.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@updateApi'));
|
||||||
Route::get('fatoni/delete/api/{id}', array('as' => 'fatoni.delete.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@deleteApi'));
|
Route::get('fatoni/delete/api/{id}', array('as' => 'fatoni.delete.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@deleteApi'));
|
||||||
|
|
||||||
|
Route::get('api/posts', 'AhmadFatoni\ApiGenerator\Controllers\API\postController@index');
|
||||||
|
Route::get('api/posts/{id}', 'AhmadFatoni\ApiGenerator\Controllers\API\postController@getPost');
|
||||||
|
|
||||||
Route::get('api/sections', 'AhmadFatoni\ApiGenerator\Controllers\API\sectionController@index');
|
Route::get('api/sections', 'AhmadFatoni\ApiGenerator\Controllers\API\sectionController@index');
|
||||||
|
Route::get('api/menu', 'AhmadFatoni\ApiGenerator\Controllers\API\sectionController@getMenu');
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ use Cms\Classes\Controller;
|
||||||
use October\Rain\Database\NestedTreeScope;
|
use October\Rain\Database\NestedTreeScope;
|
||||||
use RainLab\Blog\Classes\TagProcessor;
|
use RainLab\Blog\Classes\TagProcessor;
|
||||||
use ValidationException;
|
use ValidationException;
|
||||||
|
use Vdomah\BlogViews\Models\BlogView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Post
|
* Class Post
|
||||||
|
|
@ -82,6 +83,13 @@ class Post extends Model
|
||||||
'user' => BackendUser::class
|
'user' => BackendUser::class
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public $hasMany = [
|
||||||
|
'views' => [
|
||||||
|
BlogView::class,
|
||||||
|
'table' => 'vdomah_blogviews_views',
|
||||||
|
'key'=> 'post_id'
|
||||||
|
]
|
||||||
|
];
|
||||||
public $belongsToMany = [
|
public $belongsToMany = [
|
||||||
'categories' => [
|
'categories' => [
|
||||||
Category::class,
|
Category::class,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php namespace tps\Airport\Controllers;
|
||||||
|
|
||||||
|
use Backend\Classes\Controller;
|
||||||
|
use BackendMenu;
|
||||||
|
|
||||||
|
class Accardion extends Controller
|
||||||
|
{
|
||||||
|
public $implement = [ 'Backend\Behaviors\ListController', 'Backend\Behaviors\FormController' ];
|
||||||
|
|
||||||
|
public $listConfig = 'config_list.yaml';
|
||||||
|
public $formConfig = 'config_form.yaml';
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
BackendMenu::setContext('tps.Airport', 'main-menu-item', 'side-menu-item7');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php namespace tps\Airport\Controllers;
|
||||||
|
|
||||||
|
use Backend\Classes\Controller;
|
||||||
|
use BackendMenu;
|
||||||
|
|
||||||
|
class Flights extends Controller
|
||||||
|
{
|
||||||
|
public $implement = [ 'Backend\Behaviors\ListController', 'Backend\Behaviors\FormController' ];
|
||||||
|
|
||||||
|
public $listConfig = 'config_list.yaml';
|
||||||
|
public $formConfig = 'config_form.yaml';
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
BackendMenu::setContext('tps.Airport', 'main-menu-item', 'side-menu-item8');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php namespace tps\Airport\Controllers;
|
||||||
|
|
||||||
|
use Backend\Classes\Controller;
|
||||||
|
use BackendMenu;
|
||||||
|
|
||||||
|
class PageContent extends Controller
|
||||||
|
{
|
||||||
|
public $implement = [ 'Backend\Behaviors\ListController', 'Backend\Behaviors\FormController' ];
|
||||||
|
|
||||||
|
public $listConfig = 'config_list.yaml';
|
||||||
|
public $formConfig = 'config_form.yaml';
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
BackendMenu::setContext('tps.Airport', 'main-menu-item', 'side-menu-item6');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div data-control="toolbar">
|
||||||
|
<a href="<?= Backend::url('tps/airport/accardion/create') ?>" class="btn btn-primary oc-icon-plus"><?= e(trans('backend::lang.form.create')) ?></a>
|
||||||
|
<button
|
||||||
|
class="btn btn-default oc-icon-trash-o"
|
||||||
|
disabled="disabled"
|
||||||
|
onclick="$(this).data('request-data', {
|
||||||
|
checked: $('.control-list').listWidget('getChecked')
|
||||||
|
})"
|
||||||
|
data-request="onDelete"
|
||||||
|
data-request-confirm="<?= e(trans('backend::lang.list.delete_selected_confirm')) ?>"
|
||||||
|
data-trigger-action="enable"
|
||||||
|
data-trigger=".control-list input[type=checkbox]"
|
||||||
|
data-trigger-condition="checked"
|
||||||
|
data-request-success="$(this).prop('disabled', true)"
|
||||||
|
data-stripe-load-indicator>
|
||||||
|
<?= e(trans('backend::lang.list.delete_selected')) ?>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
name: Accardion
|
||||||
|
form: $/tps/airport/models/accardion/fields.yaml
|
||||||
|
modelClass: tps\Airport\Models\Accardion
|
||||||
|
defaultRedirect: tps/airport/accardion
|
||||||
|
create:
|
||||||
|
redirect: 'tps/airport/accardion/update/:id'
|
||||||
|
redirectClose: tps/airport/accardion
|
||||||
|
update:
|
||||||
|
redirect: tps/airport/accardion
|
||||||
|
redirectClose: tps/airport/accardion
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
list: $/tps/airport/models/accardion/columns.yaml
|
||||||
|
modelClass: tps\Airport\Models\Accardion
|
||||||
|
title: Accardion
|
||||||
|
noRecordsMessage: 'backend::lang.list.no_records'
|
||||||
|
showSetup: true
|
||||||
|
showCheckboxes: true
|
||||||
|
recordsPerPage: 20
|
||||||
|
toolbar:
|
||||||
|
buttons: list_toolbar
|
||||||
|
search:
|
||||||
|
prompt: 'backend::lang.list.search_prompt'
|
||||||
|
recordUrl: 'tps/airport/accardion/update/:id'
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?php Block::put('breadcrumb') ?>
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?= Backend::url('tps/airport/accardion') ?>">Accardion</a></li>
|
||||||
|
<li><?= e($this->pageTitle) ?></li>
|
||||||
|
</ul>
|
||||||
|
<?php Block::endPut() ?>
|
||||||
|
|
||||||
|
<?php if (!$this->fatalError): ?>
|
||||||
|
|
||||||
|
<?= Form::open(['class' => 'layout']) ?>
|
||||||
|
|
||||||
|
<div class="layout-row">
|
||||||
|
<?= $this->formRender() ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-buttons">
|
||||||
|
<div class="loading-indicator-container">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
data-request="onSave"
|
||||||
|
data-hotkey="ctrl+s, cmd+s"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
|
||||||
|
class="btn btn-primary">
|
||||||
|
<?= e(trans('backend::lang.form.create')) ?>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
data-request="onSave"
|
||||||
|
data-request-data="close:1"
|
||||||
|
data-hotkey="ctrl+enter, cmd+enter"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
|
||||||
|
class="btn btn-default">
|
||||||
|
<?= e(trans('backend::lang.form.create_and_close')) ?>
|
||||||
|
</button>
|
||||||
|
<span class="btn-text">
|
||||||
|
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('tps/airport/accardion') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?= Form::close() ?>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
|
||||||
|
<p><a href="<?= Backend::url('tps/airport/accardion') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
|
||||||
|
<?php endif ?>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
<?= $this->listRender() ?>
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php Block::put('breadcrumb') ?>
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?= Backend::url('tps/airport/accardion') ?>">Accardion</a></li>
|
||||||
|
<li><?= e($this->pageTitle) ?></li>
|
||||||
|
</ul>
|
||||||
|
<?php Block::endPut() ?>
|
||||||
|
|
||||||
|
<?php if (!$this->fatalError): ?>
|
||||||
|
|
||||||
|
<div class="form-preview">
|
||||||
|
<?= $this->formRenderPreview() ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
<p class="flash-message static error"><?= e($this->fatalError) ?></p>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="<?= Backend::url('tps/airport/accardion') ?>" class="btn btn-default oc-icon-chevron-left">
|
||||||
|
<?= e(trans('backend::lang.form.return_to_list')) ?>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?php Block::put('breadcrumb') ?>
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?= Backend::url('tps/airport/accardion') ?>">Accardion</a></li>
|
||||||
|
<li><?= e($this->pageTitle) ?></li>
|
||||||
|
</ul>
|
||||||
|
<?php Block::endPut() ?>
|
||||||
|
|
||||||
|
<?php if (!$this->fatalError): ?>
|
||||||
|
|
||||||
|
<?= Form::open(['class' => 'layout']) ?>
|
||||||
|
|
||||||
|
<div class="layout-row">
|
||||||
|
<?= $this->formRender() ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-buttons">
|
||||||
|
<div class="loading-indicator-container">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
data-request="onSave"
|
||||||
|
data-request-data="redirect:0"
|
||||||
|
data-hotkey="ctrl+s, cmd+s"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
|
||||||
|
class="btn btn-primary">
|
||||||
|
<?= e(trans('backend::lang.form.save')) ?>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
data-request="onSave"
|
||||||
|
data-request-data="close:1"
|
||||||
|
data-hotkey="ctrl+enter, cmd+enter"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
|
||||||
|
class="btn btn-default">
|
||||||
|
<?= e(trans('backend::lang.form.save_and_close')) ?>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="oc-icon-trash-o btn-icon danger pull-right"
|
||||||
|
data-request="onDelete"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.deleting')) ?>"
|
||||||
|
data-request-confirm="<?= e(trans('backend::lang.form.confirm_delete')) ?>">
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<span class="btn-text">
|
||||||
|
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('tps/airport/accardion') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?= Form::close() ?>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
|
||||||
|
<p><a href="<?= Backend::url('tps/airport/accardion') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
|
||||||
|
<?php endif ?>
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div data-control="toolbar">
|
||||||
|
<a href="<?= Backend::url('tps/airport/flights/create') ?>" class="btn btn-primary oc-icon-plus"><?= e(trans('backend::lang.form.create')) ?></a>
|
||||||
|
<button
|
||||||
|
class="btn btn-default oc-icon-trash-o"
|
||||||
|
disabled="disabled"
|
||||||
|
onclick="$(this).data('request-data', {
|
||||||
|
checked: $('.control-list').listWidget('getChecked')
|
||||||
|
})"
|
||||||
|
data-request="onDelete"
|
||||||
|
data-request-confirm="<?= e(trans('backend::lang.list.delete_selected_confirm')) ?>"
|
||||||
|
data-trigger-action="enable"
|
||||||
|
data-trigger=".control-list input[type=checkbox]"
|
||||||
|
data-trigger-condition="checked"
|
||||||
|
data-request-success="$(this).prop('disabled', true)"
|
||||||
|
data-stripe-load-indicator>
|
||||||
|
<?= e(trans('backend::lang.list.delete_selected')) ?>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
name: Flights
|
||||||
|
form: $/tps/airport/models/flights/fields.yaml
|
||||||
|
modelClass: tps\Airport\Models\Flights
|
||||||
|
defaultRedirect: tps/airport/flights
|
||||||
|
create:
|
||||||
|
redirect: 'tps/airport/flights/update/:id'
|
||||||
|
redirectClose: tps/airport/flights
|
||||||
|
update:
|
||||||
|
redirect: tps/airport/flights
|
||||||
|
redirectClose: tps/airport/flights
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
list: $/tps/airport/models/flights/columns.yaml
|
||||||
|
modelClass: tps\Airport\Models\Flights
|
||||||
|
title: Flights
|
||||||
|
noRecordsMessage: 'backend::lang.list.no_records'
|
||||||
|
showSetup: true
|
||||||
|
showCheckboxes: true
|
||||||
|
recordsPerPage: 20
|
||||||
|
toolbar:
|
||||||
|
buttons: list_toolbar
|
||||||
|
search:
|
||||||
|
prompt: 'backend::lang.list.search_prompt'
|
||||||
|
recordUrl: 'tps/airport/flights/update/:id'
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?php Block::put('breadcrumb') ?>
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?= Backend::url('tps/airport/flights') ?>">Flights</a></li>
|
||||||
|
<li><?= e($this->pageTitle) ?></li>
|
||||||
|
</ul>
|
||||||
|
<?php Block::endPut() ?>
|
||||||
|
|
||||||
|
<?php if (!$this->fatalError): ?>
|
||||||
|
|
||||||
|
<?= Form::open(['class' => 'layout']) ?>
|
||||||
|
|
||||||
|
<div class="layout-row">
|
||||||
|
<?= $this->formRender() ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-buttons">
|
||||||
|
<div class="loading-indicator-container">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
data-request="onSave"
|
||||||
|
data-hotkey="ctrl+s, cmd+s"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
|
||||||
|
class="btn btn-primary">
|
||||||
|
<?= e(trans('backend::lang.form.create')) ?>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
data-request="onSave"
|
||||||
|
data-request-data="close:1"
|
||||||
|
data-hotkey="ctrl+enter, cmd+enter"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
|
||||||
|
class="btn btn-default">
|
||||||
|
<?= e(trans('backend::lang.form.create_and_close')) ?>
|
||||||
|
</button>
|
||||||
|
<span class="btn-text">
|
||||||
|
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('tps/airport/flights') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?= Form::close() ?>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
|
||||||
|
<p><a href="<?= Backend::url('tps/airport/flights') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
|
||||||
|
<?php endif ?>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
<?= $this->listRender() ?>
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php Block::put('breadcrumb') ?>
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?= Backend::url('tps/airport/flights') ?>">Flights</a></li>
|
||||||
|
<li><?= e($this->pageTitle) ?></li>
|
||||||
|
</ul>
|
||||||
|
<?php Block::endPut() ?>
|
||||||
|
|
||||||
|
<?php if (!$this->fatalError): ?>
|
||||||
|
|
||||||
|
<div class="form-preview">
|
||||||
|
<?= $this->formRenderPreview() ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
<p class="flash-message static error"><?= e($this->fatalError) ?></p>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="<?= Backend::url('tps/airport/flights') ?>" class="btn btn-default oc-icon-chevron-left">
|
||||||
|
<?= e(trans('backend::lang.form.return_to_list')) ?>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?php Block::put('breadcrumb') ?>
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?= Backend::url('tps/airport/flights') ?>">Flights</a></li>
|
||||||
|
<li><?= e($this->pageTitle) ?></li>
|
||||||
|
</ul>
|
||||||
|
<?php Block::endPut() ?>
|
||||||
|
|
||||||
|
<?php if (!$this->fatalError): ?>
|
||||||
|
|
||||||
|
<?= Form::open(['class' => 'layout']) ?>
|
||||||
|
|
||||||
|
<div class="layout-row">
|
||||||
|
<?= $this->formRender() ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-buttons">
|
||||||
|
<div class="loading-indicator-container">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
data-request="onSave"
|
||||||
|
data-request-data="redirect:0"
|
||||||
|
data-hotkey="ctrl+s, cmd+s"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
|
||||||
|
class="btn btn-primary">
|
||||||
|
<?= e(trans('backend::lang.form.save')) ?>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
data-request="onSave"
|
||||||
|
data-request-data="close:1"
|
||||||
|
data-hotkey="ctrl+enter, cmd+enter"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
|
||||||
|
class="btn btn-default">
|
||||||
|
<?= e(trans('backend::lang.form.save_and_close')) ?>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="oc-icon-trash-o btn-icon danger pull-right"
|
||||||
|
data-request="onDelete"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.deleting')) ?>"
|
||||||
|
data-request-confirm="<?= e(trans('backend::lang.form.confirm_delete')) ?>">
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<span class="btn-text">
|
||||||
|
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('tps/airport/flights') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?= Form::close() ?>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
|
||||||
|
<p><a href="<?= Backend::url('tps/airport/flights') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
|
||||||
|
<?php endif ?>
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div data-control="toolbar">
|
||||||
|
<a href="<?= Backend::url('tps/airport/pagecontent/create') ?>" class="btn btn-primary oc-icon-plus"><?= e(trans('backend::lang.form.create')) ?></a>
|
||||||
|
<button
|
||||||
|
class="btn btn-default oc-icon-trash-o"
|
||||||
|
disabled="disabled"
|
||||||
|
onclick="$(this).data('request-data', {
|
||||||
|
checked: $('.control-list').listWidget('getChecked')
|
||||||
|
})"
|
||||||
|
data-request="onDelete"
|
||||||
|
data-request-confirm="<?= e(trans('backend::lang.list.delete_selected_confirm')) ?>"
|
||||||
|
data-trigger-action="enable"
|
||||||
|
data-trigger=".control-list input[type=checkbox]"
|
||||||
|
data-trigger-condition="checked"
|
||||||
|
data-request-success="$(this).prop('disabled', true)"
|
||||||
|
data-stripe-load-indicator>
|
||||||
|
<?= e(trans('backend::lang.list.delete_selected')) ?>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
name: PageContent
|
||||||
|
form: $/tps/airport/models/pagecontent/fields.yaml
|
||||||
|
modelClass: tps\Airport\Models\PageContent
|
||||||
|
defaultRedirect: tps/airport/pagecontent
|
||||||
|
create:
|
||||||
|
redirect: 'tps/airport/pagecontent/update/:id'
|
||||||
|
redirectClose: tps/airport/pagecontent
|
||||||
|
update:
|
||||||
|
redirect: tps/airport/pagecontent
|
||||||
|
redirectClose: tps/airport/pagecontent
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
list: $/tps/airport/models/pagecontent/columns.yaml
|
||||||
|
modelClass: tps\Airport\Models\PageContent
|
||||||
|
title: PageContent
|
||||||
|
noRecordsMessage: 'backend::lang.list.no_records'
|
||||||
|
showSetup: true
|
||||||
|
showCheckboxes: true
|
||||||
|
recordsPerPage: 20
|
||||||
|
toolbar:
|
||||||
|
buttons: list_toolbar
|
||||||
|
search:
|
||||||
|
prompt: 'backend::lang.list.search_prompt'
|
||||||
|
recordUrl: 'tps/airport/pagecontent/update/:id'
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?php Block::put('breadcrumb') ?>
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?= Backend::url('tps/airport/pagecontent') ?>">PageContent</a></li>
|
||||||
|
<li><?= e($this->pageTitle) ?></li>
|
||||||
|
</ul>
|
||||||
|
<?php Block::endPut() ?>
|
||||||
|
|
||||||
|
<?php if (!$this->fatalError): ?>
|
||||||
|
|
||||||
|
<?= Form::open(['class' => 'layout']) ?>
|
||||||
|
|
||||||
|
<div class="layout-row">
|
||||||
|
<?= $this->formRender() ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-buttons">
|
||||||
|
<div class="loading-indicator-container">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
data-request="onSave"
|
||||||
|
data-hotkey="ctrl+s, cmd+s"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
|
||||||
|
class="btn btn-primary">
|
||||||
|
<?= e(trans('backend::lang.form.create')) ?>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
data-request="onSave"
|
||||||
|
data-request-data="close:1"
|
||||||
|
data-hotkey="ctrl+enter, cmd+enter"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
|
||||||
|
class="btn btn-default">
|
||||||
|
<?= e(trans('backend::lang.form.create_and_close')) ?>
|
||||||
|
</button>
|
||||||
|
<span class="btn-text">
|
||||||
|
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('tps/airport/pagecontent') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?= Form::close() ?>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
|
||||||
|
<p><a href="<?= Backend::url('tps/airport/pagecontent') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
|
||||||
|
<?php endif ?>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
<?= $this->listRender() ?>
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php Block::put('breadcrumb') ?>
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?= Backend::url('tps/airport/pagecontent') ?>">PageContent</a></li>
|
||||||
|
<li><?= e($this->pageTitle) ?></li>
|
||||||
|
</ul>
|
||||||
|
<?php Block::endPut() ?>
|
||||||
|
|
||||||
|
<?php if (!$this->fatalError): ?>
|
||||||
|
|
||||||
|
<div class="form-preview">
|
||||||
|
<?= $this->formRenderPreview() ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
<p class="flash-message static error"><?= e($this->fatalError) ?></p>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="<?= Backend::url('tps/airport/pagecontent') ?>" class="btn btn-default oc-icon-chevron-left">
|
||||||
|
<?= e(trans('backend::lang.form.return_to_list')) ?>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?php Block::put('breadcrumb') ?>
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?= Backend::url('tps/airport/pagecontent') ?>">PageContent</a></li>
|
||||||
|
<li><?= e($this->pageTitle) ?></li>
|
||||||
|
</ul>
|
||||||
|
<?php Block::endPut() ?>
|
||||||
|
|
||||||
|
<?php if (!$this->fatalError): ?>
|
||||||
|
|
||||||
|
<?= Form::open(['class' => 'layout']) ?>
|
||||||
|
|
||||||
|
<div class="layout-row">
|
||||||
|
<?= $this->formRender() ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-buttons">
|
||||||
|
<div class="loading-indicator-container">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
data-request="onSave"
|
||||||
|
data-request-data="redirect:0"
|
||||||
|
data-hotkey="ctrl+s, cmd+s"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
|
||||||
|
class="btn btn-primary">
|
||||||
|
<?= e(trans('backend::lang.form.save')) ?>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
data-request="onSave"
|
||||||
|
data-request-data="close:1"
|
||||||
|
data-hotkey="ctrl+enter, cmd+enter"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
|
||||||
|
class="btn btn-default">
|
||||||
|
<?= e(trans('backend::lang.form.save_and_close')) ?>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="oc-icon-trash-o btn-icon danger pull-right"
|
||||||
|
data-request="onDelete"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.form.deleting')) ?>"
|
||||||
|
data-request-confirm="<?= e(trans('backend::lang.form.confirm_delete')) ?>">
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<span class="btn-text">
|
||||||
|
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('tps/airport/pagecontent') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?= Form::close() ?>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
|
||||||
|
<p><a href="<?= Backend::url('tps/airport/pagecontent') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
|
||||||
|
<?php endif ?>
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php namespace tps\Airport\Models;
|
||||||
|
|
||||||
|
use Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model
|
||||||
|
*/
|
||||||
|
class Accardion extends Model
|
||||||
|
{
|
||||||
|
use \October\Rain\Database\Traits\Validation;
|
||||||
|
|
||||||
|
use \October\Rain\Database\Traits\SoftDelete;
|
||||||
|
|
||||||
|
public $implement = ['@RainLab.Translate.Behaviors.TranslatableModel'];
|
||||||
|
|
||||||
|
public $translatable = [
|
||||||
|
'content',
|
||||||
|
'name',
|
||||||
|
'web_content'
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
protected $dates = ['deleted_at'];
|
||||||
|
|
||||||
|
protected $jsonable = ['content', 'web_content'];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string The database table used by the model.
|
||||||
|
*/
|
||||||
|
public $table = 'tps_airport_accardion';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array Validation rules
|
||||||
|
*/
|
||||||
|
public $rules = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php namespace tps\Airport\Models;
|
||||||
|
|
||||||
|
use Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model
|
||||||
|
*/
|
||||||
|
class Flights extends Model
|
||||||
|
{
|
||||||
|
use \October\Rain\Database\Traits\Validation;
|
||||||
|
|
||||||
|
use \October\Rain\Database\Traits\SoftDelete;
|
||||||
|
|
||||||
|
public $implement = ['@RainLab.Translate.Behaviors.TranslatableModel'];
|
||||||
|
|
||||||
|
public $translatable = [
|
||||||
|
'flights',
|
||||||
|
'short',
|
||||||
|
'name',
|
||||||
|
'btn'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $dates = ['deleted_at'];
|
||||||
|
|
||||||
|
protected $jsonable = ['flights'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string The database table used by the model.
|
||||||
|
*/
|
||||||
|
public $table = 'tps_airport_flights';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array Validation rules
|
||||||
|
*/
|
||||||
|
public $rules = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php namespace tps\Airport\Models;
|
||||||
|
|
||||||
|
use Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model
|
||||||
|
*/
|
||||||
|
class PageContent extends Model
|
||||||
|
{
|
||||||
|
use \October\Rain\Database\Traits\Validation;
|
||||||
|
|
||||||
|
use \October\Rain\Database\Traits\SoftDelete;
|
||||||
|
public $implement = ['@RainLab.Translate.Behaviors.TranslatableModel'];
|
||||||
|
|
||||||
|
public $translatable = [
|
||||||
|
'content',
|
||||||
|
'web_content'
|
||||||
|
];
|
||||||
|
|
||||||
|
public $jsonable = [
|
||||||
|
'web_content'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $dates = ['deleted_at'];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string The database table used by the model.
|
||||||
|
*/
|
||||||
|
public $table = 'tps_airport_page_content';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array Validation rules
|
||||||
|
*/
|
||||||
|
public $rules = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -17,6 +17,7 @@ class PageHeader extends Model
|
||||||
'header',
|
'header',
|
||||||
'short_txt',
|
'short_txt',
|
||||||
'sub_menus',
|
'sub_menus',
|
||||||
|
'file_btn'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $jsonable = ['sub_menus'];
|
protected $jsonable = ['sub_menus'];
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ class Partner extends Model
|
||||||
'header',
|
'header',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $jsonable = ['img'];
|
protected $jsonable = ['images'];
|
||||||
/**
|
/**
|
||||||
* @var string The database table used by the model.
|
* @var string The database table used by the model.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
columns:
|
||||||
|
id:
|
||||||
|
label: id
|
||||||
|
type: number
|
||||||
|
name:
|
||||||
|
label: name
|
||||||
|
type: text
|
||||||
|
note:
|
||||||
|
label: note
|
||||||
|
type: text
|
||||||
|
content_type:
|
||||||
|
label: 'cont type'
|
||||||
|
type: text
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
fields:
|
||||||
|
name:
|
||||||
|
label: Name
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
note:
|
||||||
|
label: Note
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
content_type:
|
||||||
|
label: 'Content Type'
|
||||||
|
options:
|
||||||
|
simple: Simple
|
||||||
|
steps: Steps
|
||||||
|
file: File
|
||||||
|
span: auto
|
||||||
|
default: simple
|
||||||
|
type: balloon-selector
|
||||||
|
tabs:
|
||||||
|
fields:
|
||||||
|
content:
|
||||||
|
label: Content
|
||||||
|
prompt: 'Add new item'
|
||||||
|
style: default
|
||||||
|
span: auto
|
||||||
|
type: repeater
|
||||||
|
tab: Mobile
|
||||||
|
form:
|
||||||
|
fields:
|
||||||
|
accordion_inside_item:
|
||||||
|
label: 'Rich editor'
|
||||||
|
span: full
|
||||||
|
size: large
|
||||||
|
type: richeditor
|
||||||
|
step:
|
||||||
|
label: Step
|
||||||
|
span: full
|
||||||
|
type: text
|
||||||
|
file:
|
||||||
|
label: File
|
||||||
|
span: full
|
||||||
|
mode: file
|
||||||
|
type: mediafinder
|
||||||
|
web_content:
|
||||||
|
label: 'Web Content'
|
||||||
|
prompt: 'Add new item'
|
||||||
|
style: default
|
||||||
|
span: full
|
||||||
|
type: repeater
|
||||||
|
tab: Web
|
||||||
|
form:
|
||||||
|
fields:
|
||||||
|
col1:
|
||||||
|
label: Col1
|
||||||
|
prompt: 'Add new item'
|
||||||
|
style: default
|
||||||
|
span: auto
|
||||||
|
type: repeater
|
||||||
|
form:
|
||||||
|
fields:
|
||||||
|
header:
|
||||||
|
label: Header
|
||||||
|
span: full
|
||||||
|
type: text
|
||||||
|
info:
|
||||||
|
label: Info
|
||||||
|
prompt: 'Add new item'
|
||||||
|
style: default
|
||||||
|
span: full
|
||||||
|
type: repeater
|
||||||
|
form:
|
||||||
|
fields:
|
||||||
|
text:
|
||||||
|
label: Text
|
||||||
|
span: full
|
||||||
|
type: text
|
||||||
|
col2:
|
||||||
|
label: Col2
|
||||||
|
prompt: 'Add new item'
|
||||||
|
style: default
|
||||||
|
span: auto
|
||||||
|
type: repeater
|
||||||
|
form:
|
||||||
|
fields:
|
||||||
|
header:
|
||||||
|
label: Header
|
||||||
|
span: full
|
||||||
|
type: text
|
||||||
|
info:
|
||||||
|
label: Info
|
||||||
|
prompt: 'Add new item'
|
||||||
|
style: default
|
||||||
|
span: full
|
||||||
|
type: repeater
|
||||||
|
form:
|
||||||
|
fields:
|
||||||
|
text:
|
||||||
|
label: Text
|
||||||
|
span: full
|
||||||
|
type: text
|
||||||
|
|
@ -27,6 +27,9 @@ tabs:
|
||||||
tps\Airport\Models\PageHeader: 'Page Header'
|
tps\Airport\Models\PageHeader: 'Page Header'
|
||||||
tps\Airport\Models\Partner: Partners
|
tps\Airport\Models\Partner: Partners
|
||||||
RainLab\Blog\Models\Post: Posts
|
RainLab\Blog\Models\Post: Posts
|
||||||
|
tps\Airport\Models\PageContent: 'Page Info'
|
||||||
|
tps\Airport\Models\Accardion: Accardion
|
||||||
|
tps\Airport\Models\Flights: 'Flights TimeTable'
|
||||||
showSearch: true
|
showSearch: true
|
||||||
span: auto
|
span: auto
|
||||||
type: dropdown
|
type: dropdown
|
||||||
|
|
@ -38,3 +41,7 @@ tabs:
|
||||||
label: Limit
|
label: Limit
|
||||||
span: auto
|
span: auto
|
||||||
type: number
|
type: number
|
||||||
|
flight_type:
|
||||||
|
label: 'Is FLight'
|
||||||
|
span: auto
|
||||||
|
type: switch
|
||||||
|
|
|
||||||
|
|
@ -11,3 +11,6 @@ columns:
|
||||||
note:
|
note:
|
||||||
label: note
|
label: note
|
||||||
type: text
|
type: text
|
||||||
|
menu_slug:
|
||||||
|
label: 'Menu Slug'
|
||||||
|
type: text
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,11 @@ tabs:
|
||||||
span: left
|
span: left
|
||||||
type: textarea
|
type: textarea
|
||||||
tab: Contents
|
tab: Contents
|
||||||
|
menu_slug:
|
||||||
|
label: 'Menu Slug'
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
tab: Contents
|
||||||
description:
|
description:
|
||||||
label: Description
|
label: Description
|
||||||
size: giant
|
size: giant
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
columns:
|
||||||
|
id:
|
||||||
|
label: id
|
||||||
|
type: number
|
||||||
|
name:
|
||||||
|
label: name
|
||||||
|
type: text
|
||||||
|
short:
|
||||||
|
label: short
|
||||||
|
type: text
|
||||||
|
note:
|
||||||
|
label: note
|
||||||
|
type: text
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
fields:
|
||||||
|
name:
|
||||||
|
label: Name
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
note:
|
||||||
|
label: Note
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
short:
|
||||||
|
label: 'Short Txt'
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
type_flight:
|
||||||
|
label: 'Type Flight'
|
||||||
|
options:
|
||||||
|
inside: Inside
|
||||||
|
outside: Outside
|
||||||
|
span: auto
|
||||||
|
default: inside
|
||||||
|
type: balloon-selector
|
||||||
|
btn:
|
||||||
|
label: 'Button Text Load more'
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
tabs:
|
||||||
|
fields:
|
||||||
|
flights:
|
||||||
|
label: Repeater
|
||||||
|
prompt: 'Add new flight'
|
||||||
|
style: default
|
||||||
|
span: full
|
||||||
|
type: repeater
|
||||||
|
tab: 'Tab 1'
|
||||||
|
form:
|
||||||
|
fields:
|
||||||
|
from:
|
||||||
|
label: From
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
to:
|
||||||
|
label: To
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
from_time:
|
||||||
|
label: 'From Time'
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
to_time:
|
||||||
|
label: 'To Time'
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
flight_code:
|
||||||
|
label: 'Flight Code'
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
days:
|
||||||
|
label: 'Days Flight'
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
columns:
|
||||||
|
id:
|
||||||
|
label: id
|
||||||
|
type: number
|
||||||
|
note:
|
||||||
|
label: note
|
||||||
|
type: text
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
fields:
|
||||||
|
note:
|
||||||
|
label: Note
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
tabs:
|
||||||
|
fields:
|
||||||
|
content:
|
||||||
|
label: Content
|
||||||
|
span: full
|
||||||
|
size: large
|
||||||
|
type: richeditor
|
||||||
|
tab: mobile
|
||||||
|
web_content:
|
||||||
|
label: 'Web Content'
|
||||||
|
prompt: 'Add new item'
|
||||||
|
style: default
|
||||||
|
span: full
|
||||||
|
type: repeater
|
||||||
|
tab: web
|
||||||
|
form:
|
||||||
|
fields:
|
||||||
|
header:
|
||||||
|
label: Header
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
Text:
|
||||||
|
label: Text
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
|
type:
|
||||||
|
label: Type
|
||||||
|
options:
|
||||||
|
header: Header
|
||||||
|
col: Column
|
||||||
|
span: auto
|
||||||
|
type: balloon-selector
|
||||||
|
|
@ -17,6 +17,15 @@ fields:
|
||||||
size: small
|
size: small
|
||||||
span: right
|
span: right
|
||||||
type: textarea
|
type: textarea
|
||||||
|
file:
|
||||||
|
label: File
|
||||||
|
span: auto
|
||||||
|
mode: file
|
||||||
|
type: mediafinder
|
||||||
|
file_btn:
|
||||||
|
label: 'File Btn'
|
||||||
|
span: auto
|
||||||
|
type: text
|
||||||
tabs:
|
tabs:
|
||||||
fields:
|
fields:
|
||||||
sub_menus:
|
sub_menus:
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ fields:
|
||||||
label: Note
|
label: Note
|
||||||
span: auto
|
span: auto
|
||||||
type: textarea
|
type: textarea
|
||||||
img:
|
images:
|
||||||
label: Logos
|
label: Logos
|
||||||
prompt: 'Add new logo'
|
prompt: 'Add new logo'
|
||||||
style: default
|
style: default
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ plugin:
|
||||||
homepage: ''
|
homepage: ''
|
||||||
navigation:
|
navigation:
|
||||||
main-menu-item:
|
main-menu-item:
|
||||||
label: 'Airport Menus'
|
label: 'Airport (Menus)'
|
||||||
url: tps/airport/menu
|
url: tps/airport/menu
|
||||||
icon: icon-life-ring
|
icon: icon-life-ring
|
||||||
sideMenu:
|
sideMenu:
|
||||||
|
|
@ -30,11 +30,19 @@ navigation:
|
||||||
label: Header
|
label: Header
|
||||||
url: tps/airport/pageheader
|
url: tps/airport/pageheader
|
||||||
icon: icon-star
|
icon: icon-star
|
||||||
|
side-menu-item6:
|
||||||
|
label: 'Page Contents'
|
||||||
|
url: tps/airport/pagecontent
|
||||||
|
icon: icon-sliders
|
||||||
|
side-menu-item7:
|
||||||
|
label: Accordions
|
||||||
|
url: tps/airport/accardion
|
||||||
|
icon: icon-th-list
|
||||||
|
side-menu-item8:
|
||||||
|
label: Raspisanie
|
||||||
|
url: tps/airport/flights
|
||||||
|
icon: icon-plane
|
||||||
main-menu-item2:
|
main-menu-item2:
|
||||||
label: Sections
|
label: Sections
|
||||||
url: tps/airport/content
|
url: tps/airport/content
|
||||||
icon: icon-bars
|
icon: icon-bars
|
||||||
main-menu-item3:
|
|
||||||
label: PAGES
|
|
||||||
url: tps/airport/page
|
|
||||||
icon: icon-check
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableCreateTpsAirportAccardion extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('tps_airport_accardion', function($table)
|
||||||
|
{
|
||||||
|
$table->engine = 'InnoDB';
|
||||||
|
$table->increments('id')->unsigned();
|
||||||
|
$table->timestamp('created_at')->nullable();
|
||||||
|
$table->timestamp('updated_at')->nullable();
|
||||||
|
$table->timestamp('deleted_at')->nullable();
|
||||||
|
$table->string('name')->nullable();
|
||||||
|
$table->text('content')->nullable();
|
||||||
|
$table->string('note')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('tps_airport_accardion');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableCreateTpsAirportFlights extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('tps_airport_flights', function($table)
|
||||||
|
{
|
||||||
|
$table->engine = 'InnoDB';
|
||||||
|
$table->increments('id')->unsigned();
|
||||||
|
$table->timestamp('created_at')->nullable();
|
||||||
|
$table->timestamp('updated_at')->nullable();
|
||||||
|
$table->timestamp('deleted_at')->nullable();
|
||||||
|
$table->string('name')->nullable();
|
||||||
|
$table->text('short')->nullable();
|
||||||
|
$table->text('flights')->nullable();
|
||||||
|
$table->text('note')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('tps_airport_flights');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableCreateTpsAirportPageContent extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('tps_airport_page_content', function($table)
|
||||||
|
{
|
||||||
|
$table->engine = 'InnoDB';
|
||||||
|
$table->increments('id')->unsigned();
|
||||||
|
$table->timestamp('created_at')->nullable();
|
||||||
|
$table->timestamp('updated_at')->nullable();
|
||||||
|
$table->timestamp('deleted_at')->nullable();
|
||||||
|
$table->text('content')->nullable();
|
||||||
|
$table->text('note')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('tps_airport_page_content');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsAirportAccardion extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_accardion', function($table)
|
||||||
|
{
|
||||||
|
$table->string('type')->default('accardion');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_accardion', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('type');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsAirportAccardion2 extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_accardion', function($table)
|
||||||
|
{
|
||||||
|
$table->string('content_type')->nullable()->default('simple');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_accardion', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('content_type');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsAirportAccardion3 extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_accardion', function($table)
|
||||||
|
{
|
||||||
|
$table->text('web_content')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_accardion', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('web_content');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsAirportContentCard5 extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_content_card', function($table)
|
||||||
|
{
|
||||||
|
$table->string('menu_slug')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_content_card', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('menu_slug');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsAirportFlights extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_flights', function($table)
|
||||||
|
{
|
||||||
|
$table->string('type')->default('flights_timetable');
|
||||||
|
$table->string('type_flight');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_flights', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('type');
|
||||||
|
$table->dropColumn('type_flight');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsAirportFlights2 extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_flights', function($table)
|
||||||
|
{
|
||||||
|
$table->string('btn')->nullable();
|
||||||
|
$table->string('type_flight', 191)->nullable()->change();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_flights', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('btn');
|
||||||
|
$table->string('type_flight', 191)->nullable(false)->change();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsAirportHeaders3 extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_headers', function($table)
|
||||||
|
{
|
||||||
|
$table->string('file')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_headers', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('file');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsAirportHeaders4 extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_headers', function($table)
|
||||||
|
{
|
||||||
|
$table->string('file_btn')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_headers', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('file_btn');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsAirportPageContent extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_page_content', function($table)
|
||||||
|
{
|
||||||
|
$table->string('type')->default('page_information');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_page_content', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('type');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsAirportPageContent2 extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_page_content', function($table)
|
||||||
|
{
|
||||||
|
$table->text('web_content')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_page_content', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('web_content');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php namespace tps\Airport\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsAirportPartners2 extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_partners', function($table)
|
||||||
|
{
|
||||||
|
$table->renameColumn('img', 'images');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_airport_partners', function($table)
|
||||||
|
{
|
||||||
|
$table->renameColumn('images', 'img');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -63,3 +63,45 @@
|
||||||
1.0.22:
|
1.0.22:
|
||||||
- 'Updated table tps_airport_headers'
|
- 'Updated table tps_airport_headers'
|
||||||
- builder_table_update_tps_airport_headers_2.php
|
- builder_table_update_tps_airport_headers_2.php
|
||||||
|
1.0.23:
|
||||||
|
- 'Updated table tps_airport_content_card'
|
||||||
|
- builder_table_update_tps_airport_content_card_5.php
|
||||||
|
1.0.24:
|
||||||
|
- 'Created table tps_airport_page_content'
|
||||||
|
- builder_table_create_tps_airport_page_content.php
|
||||||
|
1.0.25:
|
||||||
|
- 'Created table tps_airport_accardion'
|
||||||
|
- builder_table_create_tps_airport_accardion.php
|
||||||
|
1.0.26:
|
||||||
|
- 'Updated table tps_airport_page_content'
|
||||||
|
- builder_table_update_tps_airport_page_content.php
|
||||||
|
1.0.27:
|
||||||
|
- 'Updated table tps_airport_accardion'
|
||||||
|
- builder_table_update_tps_airport_accardion.php
|
||||||
|
1.0.28:
|
||||||
|
- 'Created table tps_airport_flights'
|
||||||
|
- builder_table_create_tps_airport_flights.php
|
||||||
|
1.0.29:
|
||||||
|
- 'Updated table tps_airport_flights'
|
||||||
|
- builder_table_update_tps_airport_flights.php
|
||||||
|
1.0.30:
|
||||||
|
- 'Updated table tps_airport_flights'
|
||||||
|
- builder_table_update_tps_airport_flights_2.php
|
||||||
|
1.0.31:
|
||||||
|
- 'Updated table tps_airport_partners'
|
||||||
|
- builder_table_update_tps_airport_partners_2.php
|
||||||
|
1.0.32:
|
||||||
|
- 'Updated table tps_airport_accardion'
|
||||||
|
- builder_table_update_tps_airport_accardion_2.php
|
||||||
|
1.0.33:
|
||||||
|
- 'Updated table tps_airport_headers'
|
||||||
|
- builder_table_update_tps_airport_headers_3.php
|
||||||
|
1.0.34:
|
||||||
|
- 'Updated table tps_airport_accardion'
|
||||||
|
- builder_table_update_tps_airport_accardion_3.php
|
||||||
|
1.0.35:
|
||||||
|
- 'Updated table tps_airport_headers'
|
||||||
|
- builder_table_update_tps_airport_headers_4.php
|
||||||
|
1.0.36:
|
||||||
|
- 'Updated table tps_airport_page_content'
|
||||||
|
- builder_table_update_tps_airport_page_content_2.php
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php namespace Vdomah\BlogViews\Models;
|
||||||
|
|
||||||
|
use Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model
|
||||||
|
*/
|
||||||
|
class BlogView extends Model
|
||||||
|
{
|
||||||
|
use \October\Rain\Database\Traits\Validation;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Disable timestamps by default.
|
||||||
|
* Remove this line if timestamps are defined in the database table.
|
||||||
|
*/
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string The database table used by the model.
|
||||||
|
*/
|
||||||
|
public $table = 'vdomah_blogviews_views';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array Validation rules
|
||||||
|
*/
|
||||||
|
public $rules = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
columns:
|
||||||
|
post_id:
|
||||||
|
label: post_id
|
||||||
|
type: number
|
||||||
|
views:
|
||||||
|
label: views
|
||||||
|
type: number
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
fields:
|
||||||
|
post_id:
|
||||||
|
label: 'Post id'
|
||||||
|
span: auto
|
||||||
|
type: number
|
||||||
|
views:
|
||||||
|
label: Views
|
||||||
|
span: auto
|
||||||
|
type: number
|
||||||
Loading…
Reference in New Issue