- We indicate to use new routes
routes resource
in fileroutes/web.php
.
Route::resource('users', 'Admin\Users\UsersController');
Route::group(['prefix' => 'blog', 'as' => 'blog.'], function () {
Route::resource('categorys', 'Admin\Blog\CategorysController');
...
});
- The controllers are saved in the
app/Http/Controllers/Admin/
folder to generate new controllers simply use the make command: controller which has the parameter--resource
already behind the methods for CRUD.
php artisan make:controller ExempleController --resource
-
The models are saved in the folder
app/Models/Admin/
-
In the following models we have added a method called seo ($ param) where the parameter is the item you want to grab. Example: title, description or keywords.
App\Models\Admin\Blog\Posts
App\Models\Admin\Gallerys\Gallerys
App\Models\Admin\Pages\Contents
App\Models\Admin\Products\Contents
Ex.: {{ $item->seo('title')}}
-
- Add image() (true or false returns the thumbnail or large image) and images() (Gallerys) method that returns the first image if any.
App\Models\Admin\Blog\Posts
App\Models\Admin\Gallerys\Gallerys
App\Models\Admin\Products\Contents
- Add image() (true or false returns the thumbnail or large image) and images() (Gallerys) method that returns the first image if any.
- For the views we use the following pattern in the folder
resources/views/admin/
. Where we will have a index.blade.php that will extend to the views create, edit and list or any other that may create.
├── module_XYZ/
| ├── index.blade.php
| ├── categorys/
| | └── create.blade.php
| | └── edit.blade.php
| | └── list.blade.php
| └── contents/
| └── create.blade.php
| └── edit.blade.php
| └── list.blade.php
- Using the command
gulp watch
in the background will be listening to the files SASS and JS that is in theresources/assets/[admin,blog,site,auth]/[js,sass]
and when detected some of them are compiled and saved in thepublic/assets/[admin,blog,site,auth]/[css,js]/
Four languages currently available for Borgert CMS, Portuguese, Spanish, and English, by default we will be setting English.
In the config/app.php file, look for locale and fallback_locale and change to pt
.
The files for translations are located in the resources/lang/[en,pt,es,zh_cn]/[admin,blog]/**
'locale' => 'en',
'fallback_locale' => 'en',
- Making a pull request or by creating an [issue] (https://github.com/odirleiborgert/borgert-cms/issues).
Report with a [issue] (https://github.com/odirleiborgert/borgert-cms/issues).