From 8c419af92d76a62e473b060c442233db79fa9c16 Mon Sep 17 00:00:00 2001 From: Alexandr Kosarev Date: Mon, 10 Sep 2018 01:01:52 +0300 Subject: [PATCH] create [restful like] CRUD for Projects * add Model, set fillables for auto-columns * add migrations * add Controller, use Restful * add View, use Edge (blade) renderer [and inherit layouts] --- admin/Controller/Project.php | 15 +++++++++++++ admin/Model/Project.php | 14 ++++++++++++ ...018_09_09_232413_create_projects_table.php | 22 +++++++++++++++++++ admin/view/Project/Html.php | 15 +++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 admin/Controller/Project.php create mode 100644 admin/Model/Project.php create mode 100644 admin/migrations/2018_09_09_232413_create_projects_table.php create mode 100644 admin/view/Project/Html.php diff --git a/admin/Controller/Project.php b/admin/Controller/Project.php new file mode 100644 index 0000000..114a0b7 --- /dev/null +++ b/admin/Controller/Project.php @@ -0,0 +1,15 @@ +create($model->getTable(), function (Blueprint $table) { + $table->increments('id'); + $table->string('title'); + $table->string('description'); + $table->timestamps(); + }); + } +} \ No newline at end of file diff --git a/admin/view/Project/Html.php b/admin/view/Project/Html.php new file mode 100644 index 0000000..5c5daac --- /dev/null +++ b/admin/view/Project/Html.php @@ -0,0 +1,15 @@ +