jasminecms / jasmine
A Laravel based CMS.
Installs: 6 377
Dependents: 4
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 2
Open Issues: 4
Language:JavaScript
Requires
- php: ^8.2
- composer-runtime-api: ^2.2
- ext-json: *
- alexusmai/laravel-file-manager: ^3.1.1
- inertiajs/inertia-laravel: ^1.0
- laravel/framework: ^11.0
- laravel/ui: ^4.0
- pragmarx/google2fa: ^8.0
- spatie/eloquent-sortable: ^4.4
- spatie/laravel-translatable: ^6.7
- tightenco/ziggy: ^1.5
Requires (Dev)
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^11.0
- dev-master
- 2.13.25
- 2.13.24
- 2.13.23
- 2.13.22
- 2.13.21
- 2.13.20
- 2.13.19
- 2.13.18
- 2.13.17
- 2.13.16
- 2.13.15
- 2.13.14
- 2.13.13
- 2.13.12
- 2.13.11
- 2.13.10
- 2.13.9
- 2.13.8
- 2.13.7
- 2.13.6
- 2.13.5
- 2.13.4
- 2.13.3
- 2.13.2
- 2.13.1
- 2.13.0
- 2.12.2
- 2.12.1
- 2.12.0
- v2.11.x-dev
- 2.11.11
- 2.11.10
- 2.11.9
- 2.11.8
- 2.11.6
- 2.11.5
- 2.11.4
- 2.11.3
- 2.11.1
- 2.11.0
- 2.10.2
- 2.10.1
- 2.10.0
- 2.9.2
- 2.9.1
- 2.9.0
- 2.8.1
- 2.8.0
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.4
- 2.7.3
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.0
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.1
- 2.4.0
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- 0.12.1
- 0.12.0
- 0.11.4
- 0.11.3
- 0.11.2
- 0.11.1
- 0.11.0
- 0.10.5
- 0.10.4
- 0.10.3
- 0.10.2
- 0.10.1
- 0.10.0
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.1
- 0.8.0
- 0.7.1
- 0.7.0
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.0
- 0.4.9
- 0.4.8
- 0.4.7
- 0.4.6
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.15
- 0.3.14
- 0.3.13
- 0.3.12
- 0.3.11
- 0.3.10
- 0.3.9
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.9
- 0.2.8
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.17
- 0.0.16
- 0.0.15
- 0.0.14
- 0.0.13
- 0.0.12
- 0.0.11
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- dev-add-tests
This package is auto-updated.
Last update: 2024-10-30 12:31:09 UTC
README
A Laravel based CMS inspired by Voyager.
Screenshots
Note
Jasmine uses alexusmai/laravel-file-manager
If you are using it already or planing to,
you might need to tweak some configurations to prevent conflicts.
Installation
Require JasmineCMS in your new or existing laravel app
composer require jasminecms/jasmine
Link jasmine public assets to your public folder
php artisan jasmine:link-public-assets
Migrate the database (be sure to make any changes to the default laravel migration prior)
php artisan migrate
Create a user (1st user is super admin)
php artisan jasmine:create-user
Add Jasmine routes to your routes/web.php
routes file (you may change the prefix to anything you like)
Route::prefix('jasmine')->group(fn() => Jasmine::routes());
Add Jasmine api routes to your routes/api.php
routes file (you may change the prefix to anything you like)
Route::prefix('jasmine')->group(fn() => Jasmine::apiRoutes());
You can now log in to Jasmine,
Navigate to /jasmine
And login
You can register Jasmine assets in your AppServiceProvider
Locales
Jasmine supports multilingual assets, define your content languages like so
Jasmine::registerLocales(['en', 'he']);
Breadables
Breadables can be any model
Run php artisan make:jasmine-model Post
to create a Jasmine Model
In your model implement
Jasmine\Jasmine\Bread\BreadableInterface
use trait Jasmine\Jasmine\Bread\Breadable
if the model has multilingual columns, also use trait
Jasmine\Jasmine\Bread\Translatable;
implement missing method
then register your model in AppServiceProvider
Jasmine::registerBreadable(\App\Models\MyModel::class);
Pages
Pages are very similar to models, but function as a single entity instead of a table
Run php artisan make:jasmine-model Post
to create a Jasmine Model
Register your pages in AppServiceProvider
Jasmine::registerPage(\App\Pages\Home::class);
Interface locale
You can translate Jasmine interface to any language like so
Jasmine::registerInterfaceLocale('he', 'path/to/locale.json');
the send parameter will accept either a path to your json file or an array of translations
you can copy /resources/front-lang/he.json
to get started quickly.
Custom assets
If for some reason you wish to load custom javascript or css you can do it like so
Jasmine::registerCustomStyle('/path/to/style.css'); Jasmine::registerCustomJs('/path/to/app.js');
Permissions
TODO
SideBarMenuItems
You can add items to the sidebar menu like so
// internal \Jasmine::registerSideBarMenuItem('settings', fn() => [ 'title' => __('Settings'), 'icon' => 'bi-link-45deg text-danger', 'href' => route('jasmine.my.route', 'my-param-value'), 'is-route' => ['r' => 'jasmine.my.route', 'p' => ['my-param' => 'my-param-value']], ], 70); // external \Jasmine::registerSideBarMenuItem('site-triple', fn() => [ 'href' => 'https://triple.co.il', 'title' => 'Triple', 'icon' => 'bi-link-45deg text-danger', 'target' => '_blank', ], 100);
TODO: registerSideBarSubMenuItem
Oauth2 SSO
You can register oauth2 providers to enable sso login to jasmine
Facebook example
Jasmine::registerOauth2Sso( 'Facebook', //name 'https://www.facebook.com/images/fb_icon_325x325.png', //icon '{client_id}', '{client_secret}', 'https://www.facebook.com/v3.3/dialog/oauth', 'https://graph.facebook.com/v3.3/oauth/access_token', ['email'], false, // accepts boolean or callback function ($token) { $token = json_decode($token, true); $res = Http::asJson()->get('https://graph.facebook.com/v3.3/me', [ 'access_token' => $token['access_token'], 'fields' => 'name,email', ]); return [ 'name' => $res->json('name'), 'email' => $res->json('email'), ]; }, );