vickzkater/lara-s-cms

The Laravel Framework.

Installs: 350

Dependents: 0

Suggesters: 0

Security: 0

Stars: 50

Watchers: 6

Forks: 14

Open Issues: 2

Type:project


README

LARA-S-CMS

LARA-S-CMS

Build Status Latest Stable Version Total Downloads License

*Latest Version: 2.0.7 (Laravel 7.30.4)

What is "Lara-S-CMS" ?

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

Features

Admin Panel

LARA-S-CMS Modules

Website

LARA-S-CMS Website

Version

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

Requirements

Installing Lara-S-CMS

Lara-S-CMS utilizes Composer to manage its dependencies. So, before using Lara-S-CMS, make sure you have Composer installed on your machine.

Composer Create-Project

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

Setup

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_NAME for application name

  • Set DISPLAY_SESSION for enable/disable display session in Admin - Footer (Development Purpose)

  • Set APP_MODE for set application mode (STAGING/LIVE)

  • Set APP_VERSION for set application version

  • Set APP_BACKEND for choose application back-end mode (MODEL or API) if use API, please make sure APP_URL_API is not empty

  • Set ADMIN_CMS for enable/disable Admin Panel

  • Set ADMIN_DIR for set application or admin system directory name (or leave it blank if using the admin dashboard only)

  • Set APP_URL_SITE for set application URL that used for login with social media

  • Set APP_URL_API for set API URL, if this project using back-end mode API (APP_BACKEND=API)

  • Set API_USER for set API auth credential (optional)

  • Set API_PASS for set API auth credential (optional)

  • Set APP_TIMEZONE for set timezone application, sample: UTC (GMT) or Asia/Jakarta (GMT+7) or Asia/Kuala_Lumpur (GMT+8)

  • Set APP_MAINTENANCE_UNTIL for set deadline maintenance application using format (Y, m - 1, d)

  • Set MULTILANG_MODULE for enable/disable multi languages module in application

  • Set DEFAULT_LANGUAGE for set default language in application

  • Set META_DESCRIPTION for set meta description

  • Set META_AUTHOR for set meta author

  • Set APP_FAVICON_TYPE for set favicon type (ico/png/etc)

  • Set APP_FAVICON for 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_LOGO for set application logo based on Font Awesome (input without 'fa-' just the icon name, example: star/laptop/bank)

  • Set APP_LOGO_IMAGE for 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 POWERED for display developer name

  • Set POWERED_URL for display developer URL

  • Set MAIL_MODULE for enable/disable Mail Module

  • Set MAIL_FROM_NAME for set sender email's name

  • Set MAIL_FROM_ADDRESS for set sender email's address

  • Set MAIL_REPLYTO_NAME for set reply-to email's name

  • Set MAIL_REPLYTO_ADDRESS for set reply-to email's address

  • Set MAIL_CONTACT_NAME for set contact email's name (used for receive email from "contact us" page)

  • Set MAIL_CONTACT_ADDRESS for set contact email's address (used for receive email from "contact us" page)

  • Set RECAPTCHA_SITE_KEY for set GOOGLE reCAPTCHA

  • Set RECAPTCHA_SECRET_KEY for set GOOGLE reCAPTCHA

  • Set RECAPTCHA_SITE_KEY_ADMIN for set GOOGLE reCAPTCHA in Admin Dashboard

  • Set RECAPTCHA_SECRET_KEY_ADMIN for set GOOGLE reCAPTCHA in Admin Dashboard

  • Set AUTH_WITH_PROVIDER for enable/disable login with social media/provider

  • Set GOOGLE_CLIENT_MODULE for enable/disable GOOGLE API Authentication

  • Set GOOGLE_CLIENT_ID for set GOOGLE API Authentication

  • Set GOOGLE_CLIENT_SECRET for set GOOGLE API Authentication

  • Set GOOGLE_CALLBACK_URL for set GOOGLE API Authentication Callback URL

  • Set FACEBOOK_CLIENT_MODULE for enable/disable FACEBOOK API Authentication

  • Set FACEBOOK_CLIENT_ID for set FACEBOOK API Authentication

  • Set FACEBOOK_CLIENT_SECRET for set FACEBOOK API Authentication

  • Set FACEBOOK_CALLBACK_URL for set FACEBOOK API Authentication Callback URL

  • Set INSTAGRAM_CLIENT_MODULE for enable/disable INSTAGRAM API Authentication

  • Set INSTAGRAM_CLIENT_ID for set INSTAGRAM API Authentication

  • Set INSTAGRAM_CLIENT_SECRET for set INSTAGRAM API Authentication

  • Set INSTAGRAM_CALLBACK_URL for set INSTAGRAM API Authentication Callback URL

  • Set FCM_SERVER_KEY for set Firebase Push Notification

  • Set FCM_SENDER_ID for set Firebase Push Notification

  • Set SMS_MODULE for enable/disable SMS Module

  • Set GOSMS_AUTH_USER for set GoSMSGateway credentials

  • Set GOSMS_AUTH_PASS for set GoSMSGateway credentials

  • Set ONEWAYSMS_API for set OnewaySMS Gateway API URL

  • Set ONEWAYSMS_AUTH_USER for set OnewaySMS Gateway credentials

  • Set ONEWAYSMS_AUTH_PASS for set OnewaySMS Gateway credentials

  • Set MC_KEY for set Mailchimp API key

  • Set MC_LIST_ID for set Mailchimp List ID

  • Set MC_TAG_DEFAULT for set Mailchimp Tag ID as default

Database Setup

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

LARA-S-CMS Login Page

Login details (default)

Administrator

Username: superuser
Password: sudo123!

Configurations

Basic Configurations

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.php in app\Libraries\ that automatically called in the load of web because it has been set in composer.json
  • Helper.php in app\Libraries\ that can be called in Controller/View by line code use App\Libraries\Helper; for call some helper functions

IMPORTANT NOTE!

Please set APP_DEBUG to false on Production to disable Laravel Debugbar.

Session Driver Database

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;
}
...

Maintenance Mode

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

LARA-S-CMS Maintenance Mode

Maintenance Mode Response Template

The default template for maintenance mode responses is located in resources/views/errors/503.blade.php and public/maintenance/

Packages Used (Outside of Laravel)

Libraries Used

Lara-S-CMS has been featured on

LARA-S-CMS on PHP Weekly

Contributing

Thank you for considering contributing to the Lara-S-CMS.

Bugs, Improvements & Security Vulnerabilities

If you discover a bug or security vulnerability within Lara-S-CMS, please send an email to Vicky Budiman at vicky@kiniditech.com. All requests will be addressed promptly.

Issues

If you come across any issue/bug please report them here.

License

Lara-S-CMS is open-sourced software built by KINIDI Tech and contributors and licensed under the MIT license.

Credits

Brought to you by

KINDI Tech

KINIDI Tech