diff --git a/composer.json b/composer.json index d1c4bc5..98e408d 100644 --- a/composer.json +++ b/composer.json @@ -66,7 +66,10 @@ ] }, "config": { - "preferred-install": "dist" + "preferred-install": "dist", + "allow-plugins": { + "composer/installers": true + } }, "minimum-stability": "dev", "prefer-stable": true diff --git a/config/database.php b/config/database.php index f967969..4565885 100644 --- a/config/database.php +++ b/config/database.php @@ -58,7 +58,7 @@ return [ 'host' => 'localhost', 'port' => 3306, 'database' => 'airport2023', - 'username' => 'root', + 'username' => 'shohrat', 'password' => 'bt110226', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/postController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/postController.php new file mode 100644 index 0000000..53ac852 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/postController.php @@ -0,0 +1,116 @@ +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', []); + } + + } + + + +} diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/sectionController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/sectionController.php index e4b9587..34ef62d 100644 --- a/plugins/ahmadfatoni/apigenerator/controllers/api/sectionController.php +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/sectionController.php @@ -9,6 +9,7 @@ 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 Config; @@ -32,15 +33,16 @@ class sectionController extends Controller 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 = [ 'page' => 'required', + //'locale' => 'required' ]; - $validator = $this->validateForm($data, $rules); + $validator = $this->validateForm($dataVal, $rules); if ($validator->fails()) { return $this->helpers->apiArrayResponseBuilder(400, 'fail', $validator->errors()); } @@ -54,15 +56,43 @@ class sectionController extends Controller $dataq = json_decode($data); for ($i = 0; $i < count($data[0]->data); $i++) { - if ($dataq[0]->data[$i]->section_id != null) { - $modified = $dataq[0]->data[$i]->section::where('id', $dataq[0]->data[$i]->section_id)->with('translations:locale,model_id,attribute_data')->first(); + 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)->first(); + + $modified->translateContext($dataVal["locale"] ?? 'ru'); + $modified->makeHidden(['created_at', 'updated_at', 'deleted_at']); $contents = array_merge($contents, array($modified)); // 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)); } + 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; @@ -74,4 +104,29 @@ class sectionController extends Controller 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', []); + } + } } diff --git a/plugins/ahmadfatoni/apigenerator/routes.php b/plugins/ahmadfatoni/apigenerator/routes.php index 878b56b..8dac1f4 100644 --- a/plugins/ahmadfatoni/apigenerator/routes.php +++ b/plugins/ahmadfatoni/apigenerator/routes.php @@ -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::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/menu', 'AhmadFatoni\ApiGenerator\Controllers\API\sectionController@getMenu'); diff --git a/plugins/rainlab/blog/models/Post.php b/plugins/rainlab/blog/models/Post.php index bf8db6d..2aab7e5 100644 --- a/plugins/rainlab/blog/models/Post.php +++ b/plugins/rainlab/blog/models/Post.php @@ -15,6 +15,7 @@ use Cms\Classes\Controller; use October\Rain\Database\NestedTreeScope; use RainLab\Blog\Classes\TagProcessor; use ValidationException; +use Vdomah\BlogViews\Models\BlogView; /** * Class Post @@ -81,7 +82,14 @@ class Post extends Model public $belongsTo = [ 'user' => BackendUser::class ]; - + + public $hasMany = [ + 'views' => [ + BlogView::class, + 'table' => 'vdomah_blogviews_views', + 'key'=> 'post_id' + ] + ]; public $belongsToMany = [ 'categories' => [ Category::class, diff --git a/plugins/tps/airport/controllers/Accardion.php b/plugins/tps/airport/controllers/Accardion.php new file mode 100644 index 0000000..ce37602 --- /dev/null +++ b/plugins/tps/airport/controllers/Accardion.php @@ -0,0 +1,18 @@ + + + + diff --git a/plugins/tps/airport/controllers/accardion/config_form.yaml b/plugins/tps/airport/controllers/accardion/config_form.yaml new file mode 100644 index 0000000..3f0e461 --- /dev/null +++ b/plugins/tps/airport/controllers/accardion/config_form.yaml @@ -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 diff --git a/plugins/tps/airport/controllers/accardion/config_list.yaml b/plugins/tps/airport/controllers/accardion/config_list.yaml new file mode 100644 index 0000000..f77c699 --- /dev/null +++ b/plugins/tps/airport/controllers/accardion/config_list.yaml @@ -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' diff --git a/plugins/tps/airport/controllers/accardion/create.htm b/plugins/tps/airport/controllers/accardion/create.htm new file mode 100644 index 0000000..58f2e7e --- /dev/null +++ b/plugins/tps/airport/controllers/accardion/create.htm @@ -0,0 +1,46 @@ + + + + +fatalError): ?> + + 'layout']) ?> + +
+ formRender() ?> +
+ +
+
+ + + + + +
+
+ + + + +

fatalError)) ?>

+

+ \ No newline at end of file diff --git a/plugins/tps/airport/controllers/accardion/index.htm b/plugins/tps/airport/controllers/accardion/index.htm new file mode 100644 index 0000000..ea43a36 --- /dev/null +++ b/plugins/tps/airport/controllers/accardion/index.htm @@ -0,0 +1 @@ +listRender() ?> diff --git a/plugins/tps/airport/controllers/accardion/preview.htm b/plugins/tps/airport/controllers/accardion/preview.htm new file mode 100644 index 0000000..b0431a5 --- /dev/null +++ b/plugins/tps/airport/controllers/accardion/preview.htm @@ -0,0 +1,22 @@ + + + + +fatalError): ?> + +
+ formRenderPreview() ?> +
+ + +

fatalError) ?>

+ + +

+ + + +

\ No newline at end of file diff --git a/plugins/tps/airport/controllers/accardion/update.htm b/plugins/tps/airport/controllers/accardion/update.htm new file mode 100644 index 0000000..71760d6 --- /dev/null +++ b/plugins/tps/airport/controllers/accardion/update.htm @@ -0,0 +1,54 @@ + + + + +fatalError): ?> + + 'layout']) ?> + +
+ formRender() ?> +
+ +
+
+ + + + + + + +
+
+ + + +

fatalError)) ?>

+

+ \ No newline at end of file diff --git a/plugins/tps/airport/controllers/flights/_list_toolbar.htm b/plugins/tps/airport/controllers/flights/_list_toolbar.htm new file mode 100644 index 0000000..1d8ba21 --- /dev/null +++ b/plugins/tps/airport/controllers/flights/_list_toolbar.htm @@ -0,0 +1,18 @@ +
+ + +
diff --git a/plugins/tps/airport/controllers/flights/config_form.yaml b/plugins/tps/airport/controllers/flights/config_form.yaml new file mode 100644 index 0000000..7991040 --- /dev/null +++ b/plugins/tps/airport/controllers/flights/config_form.yaml @@ -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 diff --git a/plugins/tps/airport/controllers/flights/config_list.yaml b/plugins/tps/airport/controllers/flights/config_list.yaml new file mode 100644 index 0000000..839f44c --- /dev/null +++ b/plugins/tps/airport/controllers/flights/config_list.yaml @@ -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' diff --git a/plugins/tps/airport/controllers/flights/create.htm b/plugins/tps/airport/controllers/flights/create.htm new file mode 100644 index 0000000..b5ff6d9 --- /dev/null +++ b/plugins/tps/airport/controllers/flights/create.htm @@ -0,0 +1,46 @@ + + + + +fatalError): ?> + + 'layout']) ?> + +
+ formRender() ?> +
+ +
+
+ + + + + +
+
+ + + + +

fatalError)) ?>

+

+ \ No newline at end of file diff --git a/plugins/tps/airport/controllers/flights/index.htm b/plugins/tps/airport/controllers/flights/index.htm new file mode 100644 index 0000000..ea43a36 --- /dev/null +++ b/plugins/tps/airport/controllers/flights/index.htm @@ -0,0 +1 @@ +listRender() ?> diff --git a/plugins/tps/airport/controllers/flights/preview.htm b/plugins/tps/airport/controllers/flights/preview.htm new file mode 100644 index 0000000..56d294b --- /dev/null +++ b/plugins/tps/airport/controllers/flights/preview.htm @@ -0,0 +1,22 @@ + + + + +fatalError): ?> + +
+ formRenderPreview() ?> +
+ + +

fatalError) ?>

+ + +

+ + + +

\ No newline at end of file diff --git a/plugins/tps/airport/controllers/flights/update.htm b/plugins/tps/airport/controllers/flights/update.htm new file mode 100644 index 0000000..4076181 --- /dev/null +++ b/plugins/tps/airport/controllers/flights/update.htm @@ -0,0 +1,54 @@ + + + + +fatalError): ?> + + 'layout']) ?> + +
+ formRender() ?> +
+ +
+
+ + + + + + + +
+
+ + + +

fatalError)) ?>

+

+ \ No newline at end of file diff --git a/plugins/tps/airport/controllers/pagecontent/_list_toolbar.htm b/plugins/tps/airport/controllers/pagecontent/_list_toolbar.htm new file mode 100644 index 0000000..b1508fb --- /dev/null +++ b/plugins/tps/airport/controllers/pagecontent/_list_toolbar.htm @@ -0,0 +1,18 @@ +
+ + +
diff --git a/plugins/tps/airport/controllers/pagecontent/config_form.yaml b/plugins/tps/airport/controllers/pagecontent/config_form.yaml new file mode 100644 index 0000000..4c66dd9 --- /dev/null +++ b/plugins/tps/airport/controllers/pagecontent/config_form.yaml @@ -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 diff --git a/plugins/tps/airport/controllers/pagecontent/config_list.yaml b/plugins/tps/airport/controllers/pagecontent/config_list.yaml new file mode 100644 index 0000000..d6fa110 --- /dev/null +++ b/plugins/tps/airport/controllers/pagecontent/config_list.yaml @@ -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' diff --git a/plugins/tps/airport/controllers/pagecontent/create.htm b/plugins/tps/airport/controllers/pagecontent/create.htm new file mode 100644 index 0000000..9c017a4 --- /dev/null +++ b/plugins/tps/airport/controllers/pagecontent/create.htm @@ -0,0 +1,46 @@ + + + + +fatalError): ?> + + 'layout']) ?> + +
+ formRender() ?> +
+ +
+
+ + + + + +
+
+ + + + +

fatalError)) ?>

+

+ \ No newline at end of file diff --git a/plugins/tps/airport/controllers/pagecontent/index.htm b/plugins/tps/airport/controllers/pagecontent/index.htm new file mode 100644 index 0000000..ea43a36 --- /dev/null +++ b/plugins/tps/airport/controllers/pagecontent/index.htm @@ -0,0 +1 @@ +listRender() ?> diff --git a/plugins/tps/airport/controllers/pagecontent/preview.htm b/plugins/tps/airport/controllers/pagecontent/preview.htm new file mode 100644 index 0000000..cab445c --- /dev/null +++ b/plugins/tps/airport/controllers/pagecontent/preview.htm @@ -0,0 +1,22 @@ + + + + +fatalError): ?> + +
+ formRenderPreview() ?> +
+ + +

fatalError) ?>

+ + +

+ + + +

\ No newline at end of file diff --git a/plugins/tps/airport/controllers/pagecontent/update.htm b/plugins/tps/airport/controllers/pagecontent/update.htm new file mode 100644 index 0000000..e1052c7 --- /dev/null +++ b/plugins/tps/airport/controllers/pagecontent/update.htm @@ -0,0 +1,54 @@ + + + + +fatalError): ?> + + 'layout']) ?> + +
+ formRender() ?> +
+ +
+
+ + + + + + + +
+
+ + + +

fatalError)) ?>

+

+ \ No newline at end of file diff --git a/plugins/tps/airport/models/Accardion.php b/plugins/tps/airport/models/Accardion.php new file mode 100644 index 0000000..912e250 --- /dev/null +++ b/plugins/tps/airport/models/Accardion.php @@ -0,0 +1,38 @@ +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'); + } +} diff --git a/plugins/tps/airport/updates/builder_table_create_tps_airport_flights.php b/plugins/tps/airport/updates/builder_table_create_tps_airport_flights.php new file mode 100644 index 0000000..0241ac4 --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_create_tps_airport_flights.php @@ -0,0 +1,28 @@ +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'); + } +} diff --git a/plugins/tps/airport/updates/builder_table_create_tps_airport_page_content.php b/plugins/tps/airport/updates/builder_table_create_tps_airport_page_content.php new file mode 100644 index 0000000..336ec57 --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_create_tps_airport_page_content.php @@ -0,0 +1,26 @@ +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'); + } +} diff --git a/plugins/tps/airport/updates/builder_table_update_tps_airport_accardion.php b/plugins/tps/airport/updates/builder_table_update_tps_airport_accardion.php new file mode 100644 index 0000000..dacb985 --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_update_tps_airport_accardion.php @@ -0,0 +1,23 @@ +string('type')->default('accardion'); + }); + } + + public function down() + { + Schema::table('tps_airport_accardion', function($table) + { + $table->dropColumn('type'); + }); + } +} diff --git a/plugins/tps/airport/updates/builder_table_update_tps_airport_accardion_2.php b/plugins/tps/airport/updates/builder_table_update_tps_airport_accardion_2.php new file mode 100644 index 0000000..9927a46 --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_update_tps_airport_accardion_2.php @@ -0,0 +1,23 @@ +string('content_type')->nullable()->default('simple'); + }); + } + + public function down() + { + Schema::table('tps_airport_accardion', function($table) + { + $table->dropColumn('content_type'); + }); + } +} diff --git a/plugins/tps/airport/updates/builder_table_update_tps_airport_accardion_3.php b/plugins/tps/airport/updates/builder_table_update_tps_airport_accardion_3.php new file mode 100644 index 0000000..999319a --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_update_tps_airport_accardion_3.php @@ -0,0 +1,23 @@ +text('web_content')->nullable(); + }); + } + + public function down() + { + Schema::table('tps_airport_accardion', function($table) + { + $table->dropColumn('web_content'); + }); + } +} diff --git a/plugins/tps/airport/updates/builder_table_update_tps_airport_content_card_5.php b/plugins/tps/airport/updates/builder_table_update_tps_airport_content_card_5.php new file mode 100644 index 0000000..cdfc320 --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_update_tps_airport_content_card_5.php @@ -0,0 +1,23 @@ +string('menu_slug')->nullable(); + }); + } + + public function down() + { + Schema::table('tps_airport_content_card', function($table) + { + $table->dropColumn('menu_slug'); + }); + } +} diff --git a/plugins/tps/airport/updates/builder_table_update_tps_airport_flights.php b/plugins/tps/airport/updates/builder_table_update_tps_airport_flights.php new file mode 100644 index 0000000..02bdd71 --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_update_tps_airport_flights.php @@ -0,0 +1,25 @@ +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'); + }); + } +} diff --git a/plugins/tps/airport/updates/builder_table_update_tps_airport_flights_2.php b/plugins/tps/airport/updates/builder_table_update_tps_airport_flights_2.php new file mode 100644 index 0000000..842d618 --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_update_tps_airport_flights_2.php @@ -0,0 +1,25 @@ +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(); + }); + } +} diff --git a/plugins/tps/airport/updates/builder_table_update_tps_airport_headers_3.php b/plugins/tps/airport/updates/builder_table_update_tps_airport_headers_3.php new file mode 100644 index 0000000..f64f7bf --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_update_tps_airport_headers_3.php @@ -0,0 +1,23 @@ +string('file')->nullable(); + }); + } + + public function down() + { + Schema::table('tps_airport_headers', function($table) + { + $table->dropColumn('file'); + }); + } +} diff --git a/plugins/tps/airport/updates/builder_table_update_tps_airport_headers_4.php b/plugins/tps/airport/updates/builder_table_update_tps_airport_headers_4.php new file mode 100644 index 0000000..3d9f40c --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_update_tps_airport_headers_4.php @@ -0,0 +1,23 @@ +string('file_btn')->nullable(); + }); + } + + public function down() + { + Schema::table('tps_airport_headers', function($table) + { + $table->dropColumn('file_btn'); + }); + } +} diff --git a/plugins/tps/airport/updates/builder_table_update_tps_airport_page_content.php b/plugins/tps/airport/updates/builder_table_update_tps_airport_page_content.php new file mode 100644 index 0000000..f443766 --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_update_tps_airport_page_content.php @@ -0,0 +1,23 @@ +string('type')->default('page_information'); + }); + } + + public function down() + { + Schema::table('tps_airport_page_content', function($table) + { + $table->dropColumn('type'); + }); + } +} diff --git a/plugins/tps/airport/updates/builder_table_update_tps_airport_page_content_2.php b/plugins/tps/airport/updates/builder_table_update_tps_airport_page_content_2.php new file mode 100644 index 0000000..77bcc94 --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_update_tps_airport_page_content_2.php @@ -0,0 +1,23 @@ +text('web_content')->nullable(); + }); + } + + public function down() + { + Schema::table('tps_airport_page_content', function($table) + { + $table->dropColumn('web_content'); + }); + } +} diff --git a/plugins/tps/airport/updates/builder_table_update_tps_airport_partners_2.php b/plugins/tps/airport/updates/builder_table_update_tps_airport_partners_2.php new file mode 100644 index 0000000..a7b7ecc --- /dev/null +++ b/plugins/tps/airport/updates/builder_table_update_tps_airport_partners_2.php @@ -0,0 +1,23 @@ +renameColumn('img', 'images'); + }); + } + + public function down() + { + Schema::table('tps_airport_partners', function($table) + { + $table->renameColumn('images', 'img'); + }); + } +} diff --git a/plugins/tps/airport/updates/version.yaml b/plugins/tps/airport/updates/version.yaml index 0095ee1..fb9cf63 100644 --- a/plugins/tps/airport/updates/version.yaml +++ b/plugins/tps/airport/updates/version.yaml @@ -63,3 +63,45 @@ 1.0.22: - 'Updated table tps_airport_headers' - 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 diff --git a/plugins/vdomah/blogviews/models/BlogView.php b/plugins/vdomah/blogviews/models/BlogView.php new file mode 100644 index 0000000..5dca79f --- /dev/null +++ b/plugins/vdomah/blogviews/models/BlogView.php @@ -0,0 +1,29 @@ +