Download the PHP package gogilo/admin-md without Composer
On this page you can find all versions of the php package gogilo/admin-md. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gogilo/admin-md
More information about gogilo/admin-md
Files in gogilo/admin-md
Package admin-md
Short Description Material Dashboard themed CMS for Laravel
License MIT
Informations about the package admin-md
Bootstrap CMS for Laravel
This package is a Content Management System for a laravel website with all the common features available. It has a fully functional backend for administering the website and uses Laravel 5.*, bootstrapCSS, jquery, fontawesome, DataTables, Tinymce, etc.
It is very simple to setup and use. One will only need to create a theme for their website using blade templates as would be necessary.
Installation
Through Composer
Or
You can also update your composer.json as follows
then run
Add service provider to the list of providers
This step is optional for those using Laravel 5.5 and above, as the package is discoverable by laravel. But incase you disable discovarability for this package or if you are using a lower version of Laravel, you can always add this service provider to you list of service providers in the config/app.php file
Handling guest access to the admin routes
To ensure the user is directed to the correct login page why trying to access the admin page, modify the unauthenticated() function in the app/Exceptions/Handler.php by adding
in case the function is not already in your exceptions handler class, you can just add the function below to overide the inherited function.
Install or Update
run artisan admin:install/admin:update command to create all the necessary tables for the CMS including all roles and user tables as well as publish all required resources;
This Commands will install all frontend components, create the necessary database structure(perform migrations) and publish necessary resources for the package.
After every update of gogilo/admin, it's necessary to run the admin:update command as this will fix any database structure changes, any theme changes and also perform necessary cleanup/housekeeping.
Configure sanctum
Configure sanctum for spa api authentication
-
in the app/Http/Kernel.php file uncomment middleware
- in the config/sanctum.php file change the
to
- in the config/cors.php file change the line
to
- update your .env file with the following
Guards and Auth Providers
Update the config/auth.php file to include the admins provider and admin guard
To the list of your auth providers, add
To the list of your guards, add
remember for api too
Add the login route to the routes/web.php
Extending Admin
You can easily add more items to the admin section of the CMS by creating your iwn custom content type and providing links to the content type you have created. It can either be in your application by adding a couple of Controllers, Models and Views.
Routes
Ensure that your routes are protected by "auth:admin" guard
Example
this will create a route named admin-example with uri /admin/example
Menu
Add your Item to the admin menu/nav by adding it to the admin.menu config. This you should do in the boot method of the application's/package's service provider class.
Example
Sub Menus
You can also create a dropdown menu(s) using the above simple configurations. Use your config name as the key while the submenu(s) and items will take place of the caption as an array of submenus.
Example
If you only have one sub-menu, you can just pass the array to the root key as shown below
NOTE: Each submenu must have a caption and submenu keys. The caption will be the caption of the menu while submenu cantains route caption key value pairs for all the items in the submenu.
To add a devider in the sub menu. just add a dash key value pair item
Views
Your views should:
- extend the admin::layout.main.
- Have the following sections on your view i) title ii page_title iii) breadcrumbs iv) sidebar v) content vi) styles vii) scripts_top viii) scripts_bottom
Example
Feedback form handling
Submit feedback by posting to the contact/post or contact-post route in Laravel. the following parameters need to be posted
and the data
The name, email and comments fields are required.
Response
On submission of the comment, you'll get a json response for error or success
Error
Success
You can handle this response and give appropriate response.
Input fileds in views
Select
To enable select picker on you select fields, include the following properties for the select element
Example
Frontend
You can now use vuejs in your admin pages. all admin related vuejs components along with any related sass files will be compiled into admin.js and admin.css files respectively, this therefore requires that you you modify the wbpack.mix.js to cover these two files. The following steps will help you in handling this situation.
1. Publish Vue Resources
run the publish artisan command with the tag vue-resources as follows
2. Update webpack.mix.js file
Add compilation of admin.js and admin.css to webpack config
SETUP
Admin CMS is now equiped with a quick tool for webmasters to generate the sitemap of the website quickly and effeciently use the url [site_url]/admin/setup
Click Grenerate Sitemap and one will be quickly generated for you on the website public_path
You also have the alternative of making using console by running the command
You can schedule the generation of the sitemap at regular intervals using laravel's task scheduler
Happy websiting
By George Ogilo [email protected] https://www.gogilo.com +254711347184/+254735388704
All versions of admin-md with dependencies
laravel/helpers Version ^1.0
spatie/laravel-searchable Version ^1.0
spatie/laravel-sitemap Version ^4.0|^5.0|^6.0
intervention/image Version ^2.7
intervention/imagecache Version ^2.5
doctrine/dbal Version ^3.0
gogilo/laravel-api-response-helpers Version ^1.0
lasserafn/php-initial-avatar-generator Version ^4.2