*Latest Version: 2.0.7 (Laravel 7.30.4)
A PHP Laravel Skeleton for Content Management System (CMS) or Admin Dashboard (within/without website) using Bootstrap 4 Admin Dashboard Template Gentelella as Admin Template.
For sample as website, we are using Modern Business a free Bootstrap 4 website template
Laravel (S) Content Management System
- Skeleton 💀
- Simple 😃
- Sample 🤓
- Standard 💯
- Smart 🧠
- Sophisticated 💡
- SUPER 💪
- Sucks? 💢
- Spinner 🤣
Developed by @vickzkater (Powered by KINIDI Tech) since September 2019
- Support Multi Languages
- Admin Login
- My Profile
- Office/Subsidiary Management
- Branch per Office Management
- Rule Management
- Usergroup Management
- User (Admin) Management
- Access/Privilege/User Roles Management
- Simple System Logs
- Restore Deleted Data
- Custom 404 Error Page
- Custom Maintenance Mode
- Product Management (as module sample including upload image feature)
- Support DataTables AJAX
- Support reCAPTCHA v2 (optional for Admin Panel & User Panel)
- Sortable Data List (in Banner Module)
- Sortable Data List with Filter (in Branch Module - Filter by Division)
- Application Configurations
- Import & Export Excel File (in Product Module)
- Delete Uploaded Image (in Product Module)
- Rich Text Editor/WYSIWYG using TinyMCE (in Product Module)
- Datepicker (in Product Module)
- The Helper PHP - a lot of PHP helper functions that are ready to help in your project
- Support GoSMSGateway API - send SMS (in DevController)
- Support Mailchimp API (in DevController)
- PageBuilder (in Article)
- The Helper JS - a lot of JS helper functions that are ready to help in your project
- Banner Management
- QR Code Generator
- Login with social media (Google/Facebook)
- Support back-end mode (MODEL or API)
- Support upload file (PDF/TXT/DOCS/etc)
- Support Session Driver Database (please check section
Session Driver Database) - Security update: if password has been changed, then force user to re-login
- Feature logout from all sessions
- Sample function sending email & email template (support HTML & Plain Text)
- Generate thumbnail (in Article Module for saving thumbnail)
- Support One Way SMS Gateway API - send SMS (in DevController)
- Add support Login with Instagram - to use it read Instagram's Official Guide
- Setup Open Graph configurations (based on ogp.me, Twitter Dev Docs, & FB Dev Docs)
- Guzzle-Client helper functions (please check on Controller.php)
| Laravel | Lara-S-CMS |
|---|---|
| 5.8.x | 1.0 ; 1.1.0 |
| 6.x | 1.0.1 ; 1.1.1 |
| 7.x | 1.2.x ; 2.x |
- PHP >= 7.3
- Laravel 7.x Requirements
Lara-S-CMS utilizes Composer to manage its dependencies. So, before using Lara-S-CMS, make sure you have Composer installed on your machine.
You may also install Lara-S-CMS by issuing the Composer create-project command in your terminal:
composer create-project vickzkater/lara-s-cms --prefer-dist website
After creating the project move to the project root folder eg: cd website and run the command to set up database and configuration files (if key is not generated while installing).
php artisan key:generate
Application Key
The next thing you should do after installing Lara-S-CMS is set your application key to a random string. If you installed Lara-S-CMS via Composer or the Lara-S-CMS installer, this key has already been set for you by the key:generate command. Typically, this string should be 32 characters long. The key can be set in the .env environment file. If you have not renamed the .env.example file to .env, you should do that now. If the application key is not set, your user sessions and other encrypted data will not be secure!
Next, setup environment configuration in .env file
-
Set
APP_NAMEfor application name -
Set
DISPLAY_SESSIONfor enable/disable display session in Admin - Footer (Development Purpose) -
Set
APP_MODEfor set application mode (STAGING/LIVE) -
Set
APP_VERSIONfor set application version -
Set
APP_BACKENDfor choose application back-end mode (MODEL or API) if use API, please make sureAPP_URL_APIis not empty -
Set
ADMIN_CMSfor enable/disable Admin Panel -
Set
ADMIN_DIRfor set application or admin system directory name (or leave it blank if using the admin dashboard only) -
Set
APP_URL_SITEfor set application URL that used for login with social media -
Set
APP_URL_APIfor set API URL, if this project using back-end mode API (APP_BACKEND=API) -
Set
API_USERfor set API auth credential (optional) -
Set
API_PASSfor set API auth credential (optional) -
Set
APP_TIMEZONEfor set timezone application, sample: UTC (GMT) or Asia/Jakarta (GMT+7) or Asia/Kuala_Lumpur (GMT+8) -
Set
APP_MAINTENANCE_UNTILfor set deadline maintenance application using format (Y, m - 1, d) -
Set
MULTILANG_MODULEfor enable/disable multi languages module in application -
Set
DEFAULT_LANGUAGEfor set default language in application -
Set
META_DESCRIPTIONfor set meta description -
Set
META_AUTHORfor set meta author -
Set
APP_FAVICON_TYPEfor set favicon type (ico/png/etc) -
Set
APP_FAVICONfor set application favicon based on file image (input with image's path), sample: the favicon file is in public/images directory path, then set 'images/favicon.ico' -
Set
APP_LOGOfor set application logo based on Font Awesome (input without 'fa-' just the icon name, example: star/laptop/bank) -
Set
APP_LOGO_IMAGEfor set application logo based on file image (input with image's path), sample: the logo image is in "public/images" directory path, then set "images/logo.png" -
Set
POWEREDfor display developer name -
Set
POWERED_URLfor display developer URL -
Set
MAIL_MODULEfor enable/disable Mail Module -
Set
MAIL_FROM_NAMEfor set sender email's name -
Set
MAIL_FROM_ADDRESSfor set sender email's address -
Set
MAIL_REPLYTO_NAMEfor set reply-to email's name -
Set
MAIL_REPLYTO_ADDRESSfor set reply-to email's address -
Set
MAIL_CONTACT_NAMEfor set contact email's name (used for receive email from "contact us" page) -
Set
MAIL_CONTACT_ADDRESSfor set contact email's address (used for receive email from "contact us" page) -
Set
RECAPTCHA_SITE_KEYfor set GOOGLE reCAPTCHA -
Set
RECAPTCHA_SECRET_KEYfor set GOOGLE reCAPTCHA -
Set
RECAPTCHA_SITE_KEY_ADMINfor set GOOGLE reCAPTCHA in Admin Dashboard -
Set
RECAPTCHA_SECRET_KEY_ADMINfor set GOOGLE reCAPTCHA in Admin Dashboard -
Set
AUTH_WITH_PROVIDERfor enable/disable login with social media/provider -
Set
GOOGLE_CLIENT_MODULEfor enable/disable GOOGLE API Authentication -
Set
GOOGLE_CLIENT_IDfor set GOOGLE API Authentication -
Set
GOOGLE_CLIENT_SECRETfor set GOOGLE API Authentication -
Set
GOOGLE_CALLBACK_URLfor set GOOGLE API Authentication Callback URL -
Set
FACEBOOK_CLIENT_MODULEfor enable/disable FACEBOOK API Authentication -
Set
FACEBOOK_CLIENT_IDfor set FACEBOOK API Authentication -
Set
FACEBOOK_CLIENT_SECRETfor set FACEBOOK API Authentication -
Set
FACEBOOK_CALLBACK_URLfor set FACEBOOK API Authentication Callback URL -
Set
INSTAGRAM_CLIENT_MODULEfor enable/disable INSTAGRAM API Authentication -
Set
INSTAGRAM_CLIENT_IDfor set INSTAGRAM API Authentication -
Set
INSTAGRAM_CLIENT_SECRETfor set INSTAGRAM API Authentication -
Set
INSTAGRAM_CALLBACK_URLfor set INSTAGRAM API Authentication Callback URL -
Set
FCM_SERVER_KEYfor set Firebase Push Notification -
Set
FCM_SENDER_IDfor set Firebase Push Notification -
Set
SMS_MODULEfor enable/disable SMS Module -
Set
GOSMS_AUTH_USERfor set GoSMSGateway credentials -
Set
GOSMS_AUTH_PASSfor set GoSMSGateway credentials -
Set
ONEWAYSMS_APIfor set OnewaySMS Gateway API URL -
Set
ONEWAYSMS_AUTH_USERfor set OnewaySMS Gateway credentials -
Set
ONEWAYSMS_AUTH_PASSfor set OnewaySMS Gateway credentials -
Set
MC_KEYfor set Mailchimp API key -
Set
MC_LIST_IDfor set Mailchimp List ID -
Set
MC_TAG_DEFAULTfor set Mailchimp Tag ID as default
You must run the database migration for running this application.
Make sure DB_DATABASE is set correctly in .env file then run migrations to create the structure database and some system data
php artisan migrate
After migration finish run the command php artisan serve or browse the link to view the admin login page (application URL with addition /ADMIN_DIR - based on .env).
http://path-to-project-folder/public/manager
Administrator
Username: superuser
Password: sudo123!
Directory Permissions
After installing Lara-S-CMS, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server. If you are using the Homestead virtual machine, these permissions should already be set.
And with additionally configure the permission for directory public/uploads/. So upload photos feature in Product Module can work well.
chmod o+w -R public/uploads/
*If after setup all configs, but still display error "500 Internal Server Error"
Comment first line in .htaccess for fix this issue
#Header always set Content-Security-Policy: upgrade-insecure-requests
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
*) This issue is reported only occur on some hosting servers, e.g. AWS (Amazon Web Service)
*For your information
CustomFunction.phpinapp\Libraries\that automatically called in the load of web because it has been set incomposer.jsonHelper.phpinapp\Libraries\that can be called in Controller/View by line codeuse App\Libraries\Helper;for call some helper functions
Please set APP_DEBUG to false on Production to disable Laravel Debugbar.
When using the database session driver, you will need to create a table to contain the session items. Below is an example Schema declaration for the table:
Schema::create('sessions', function ($table) {
$table->string('id')->unique();
$table->foreignId('user_id')->nullable();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->text('payload');
$table->integer('last_activity');
});
You may use the session:table Artisan command to generate this migration:
php artisan session:table
php artisan migrate
Then you need make some changes in Illuminate\Session\DatabaseSessionHandler.php
...
protected function addUserInformation(&$payload)
{
if ($this->container->bound(Guard::class)) {
$payload['user_id'] = $this->userId();
}
// ADDED FOR LARA-S-CMS BY KINIDI TECH - BEGIN
if(\Session::has('admin')){
$larascms_user = \Session::get('admin');
$payload['user_id'] = $larascms_user->id;
}
// ADDED FOR LARA-S-CMS BY KINIDI TECH - END
return $this;
}
...
When your application is in maintenance mode, a custom view will be displayed for all requests into your application. This makes it easy to "disable" your application while it is updating or when you are performing maintenance. A maintenance mode check is included in the default middleware stack for your application. If the application is in maintenance mode, an HttpException will be thrown with a status code of 503.
To enable maintenance mode, simply execute the down Artisan command:
php artisan down
To disable maintenance mode, use the up command:
php artisan up
Even while in maintenance mode, specific IP addresses or networks may be allowed to access the application using the command
php artisan down --allow=127.0.0.1 --allow=192.168.0.0/16
Source: Laravel Documentations
The default template for maintenance mode responses is located in resources/views/errors/503.blade.php and public/maintenance/
- yajra/laravel-datatables-oracle - used to display a list of data in a table
- maatwebsite/excel - used to export & import Excel data
- guzzlehttp/guzzle - used to send HTTP requests and trivial to integrate with web services
- nztim/mailchimp - used to Mailchimp API
- simplesoftwareio/simple-qrcode - used to generate QR code
- laravel/socialite - used to login with social media
- intervention/image - used to generate thumbnail image
- Laravel Debugbar - used to development
- The Helper PHP - a lot of PHP helper functions that are ready to help in your project
- The Helper JS - a lot of JS helper functions that are ready to help in your project
- GoSMSGateway API - Laravel Library (GoSms)
- Mailchimp API Helper - Laravel Library (MailchimpHelper)
- PageBuilder (Build pages using content elements)
- One Way SMS Gateway API - Laravel Library (OnewaySms)
- PHP Weekly - phpweekly.com
Thank you for considering contributing to the Lara-S-CMS.
If you discover a bug or security vulnerability within Lara-S-CMS, please send an email to Vicky Budiman at [email protected]. All requests will be addressed promptly.
If you come across any issue/bug please report them here.
Lara-S-CMS is open-sourced software built by KINIDI Tech and contributors and licensed under the MIT license.
- Vicky Budiman (https://github.com/vickzkater)
- Laravel (https://github.com/laravel/laravel)
- ColorlibHQ (https://github.com/ColorlibHQ/gentelella)
- Start Bootstrap (https://startbootstrap.com/)
Brought to you by
KINIDI Tech