Skip to content

Commit

Permalink
Merge pull request #11 from vickzkater/v2.0.1
Browse files Browse the repository at this point in the history
v2.0.1
  • Loading branch information
vickzkater authored Jul 9, 2020
2 parents 6c5c3c0 + 5a50302 commit 360aacb
Show file tree
Hide file tree
Showing 14 changed files with 476 additions and 200 deletions.
11 changes: 11 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ APP_URL=http://localhost
APP_DEBUG=true
DISPLAY_SESSION=false

APP_MODE=STAGING
APP_VERSION="1.0"
APP_BACKEND=MODEL
ADMIN_CMS=true
Expand All @@ -13,6 +14,9 @@ ADMIN_DIR="manager"
APP_URL_SITE=http://localhost/lara-s-cms/public/${ADMIN_DIR}
APP_URL_API=http://localhost/lara-s-cms/public/api

API_USER=
API_PASS=

APP_TIMEZONE="UTC"
APP_MAINTENANCE_UNTIL="2021, 1 - 1, 12" #format (Y, m - 1, d)

Expand Down Expand Up @@ -84,6 +88,8 @@ RECAPTCHA_SECRET_KEY=
RECAPTCHA_SITE_KEY_ADMIN=
RECAPTCHA_SECRET_KEY_ADMIN=

AUTH_WITH_PROVIDER=true

GOOGLE_CLIENT_MODULE=true
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
Expand All @@ -99,6 +105,11 @@ TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
TWITTER_CALLBACK_URL="${APP_URL_SITE}/auth/twitter/callback"

INSTAGRAM_CLIENT_MODULE=false
INSTAGRAM_CLIENT_ID=
INSTAGRAM_CLIENT_SECRET=
INSTAGRAM_CALLBACK_URL="${APP_URL_SITE}/auth/instagram/callback"

LINKEDIN_CLIENT_MODULE=false
LINKEDIN_CLIENT_ID=
LINKEDIN_CLIENT_SECRET=
Expand Down
70 changes: 61 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
## What is "Lara-S-CMS" ?

Laravel (S) Content Management System
- Skeleton
- Simple
- Sample
- Standard
- Smart
- Sophisticated
- SUPER
- Sucks?
- Skeleton 💀
- Simple 😃
- Sample 🤓
- Standard 💯
- Smart 🧠
- Sophisticated 💡
- SUPER 💪
- Sucks? 💢
- Spinner 🤣

A PHP Laravel Skeleton for Content Management System (CMS) or Admin Dashboard (within/without website) using Bootstrap 4 Admin Dashboard Template [Gentelella](https://github.com/ColorlibHQ/gentelella) as Admin Template.

Expand Down Expand Up @@ -62,6 +63,9 @@ Developed by [@vickzkater](https://github.com/vickzkater/) (Powered by [KINIDI T
- [x] Login with social media (Google/Facebook)
- [x] Support back-end mode (MODEL or API)
- [x] Support upload file (PDF/TXT/DOCS/etc)
- [x] Support Session Driver Database (please check section `Session Driver Database`)
- [x] Security update: if password has been changed, then force user to re-login
- [x] Feature logout from all sessions

## Admin Panel

Expand All @@ -77,7 +81,7 @@ Developed by [@vickzkater](https://github.com/vickzkater/) (Powered by [KINIDI T
:---------|:----------
5.8.x | 1.0 ; 1.1.0
6.x | 1.0.1 ; 1.1.1
7.x | 1.2.x
7.x | 1.2.x ; 2.x

## Requirements

Expand Down Expand Up @@ -112,6 +116,7 @@ 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
Expand All @@ -120,6 +125,9 @@ Next, setup environment configuration in `.env` file
- 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 or Asia/Jakarta
- Set `APP_MAINTENANCE_UNTIL` for set deadline maintenance application using format (Y, m - 1, d)

Expand Down Expand Up @@ -149,6 +157,8 @@ Next, setup environment configuration in `.env` file
- 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
Expand Down Expand Up @@ -222,6 +232,48 @@ chmod o+w -R public/uploads/
- `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

## 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.
Expand Down
7 changes: 7 additions & 0 deletions VERSION.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## Version 2.0.1
### Changelog
- Add support auth for Guzzle functions
- Add support Session Driver Database
- Add security update: if password has been changed, then force user to re-login
- Add feature logout from all sessions

## Version 2.0.0
### Changelog
- Add QR Code Generator
Expand Down
Loading

0 comments on commit 360aacb

Please sign in to comment.