An Starter Kit For Laravel Projects https://4xmen.ir
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
freeman 369a6e5cba fix bug 2 weeks ago
.idea fix bug 2 weeks ago
config fix some bug dec valiation senstivety 3 weeks ago
database/migrations fix some bug dec valiation senstivety 3 weeks ago
public fix some bug dec valiation senstivety 3 weeks ago
resources fix some bug dec valiation senstivety 3 weeks ago
routes fix some bug dec valiation senstivety 3 weeks ago
src fix bug 2 weeks ago
.gitignore first commit 2 years ago
.php_cs Code style added 2 years ago
LICENSE.md first commit 2 years ago
README.md fix readme for laravel 9.x 3 weeks ago
composer.json update fix all problem for laravel 9.x 8 months ago
composer.lock add assets 10 months ago
package-lock.json add assets 10 months ago
package-sample.json fix bugs 1 year ago
package.json fix major error 1 year ago
screenshot.jpg add demo and screenshot to readme 2 years ago
webpack.mix.js Add Asset compilation 1 year ago

README.md

Laravel Starter Kit

Latest Version on Packagist Total Downloads

An Starter Kit For Laravel Projects.

Installation

1-Install the package via composer:

composer require xmen/starter-kit

2-Publish and run the migrations with:

php artisan vendor:publish --provider="Xmen\StarterKit\StarterKitServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="migrations"
php artisan migrate

3-Publish the assets with:

php artisan vendor:publish --provider="Xmen\StarterKit\StarterKitServiceProvider" --tag="assets"
php artisan vendor:publish --provider="Xmen\StarterKit\StarterKitServiceProvider" --tag="fonts"

4-Publish the language file with:

php artisan vendor:publish --provider="Xmen\StarterKit\StarterKitServiceProvider" --tag="lang"

5-Add StarterKit trait to User model:

use Xmen\StarterKit\Models\StarterKit;

class User extends Authenticatable {
    use StarterKit;
...
}

6-Change the home path to dashboard in RouteServiceProvider:

//app/Providers/RouteServiceProvider.php

public const HOME = '/dashboard';

7-Add role middleware to Kernel.php:

    //app/Http/Kernel.php

    protected $routeMiddleware = [
        ...
        'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class,
    ];

You can publish the config file with:

php artisan vendor:publish --provider="Xmen\StarterKit\StarterKitServiceProvider" --tag="config"

This is the contents of the published config file:

return [
    //The dashboard uri
    'uri'=>'dashboard',
];

Usage

Create admin user by running install command and then login to dashboard:

php artisan starter-kit:install

Also install laravel/ui if you need login/registration.

Laravel 9 and above:

composer require laravel/ui
php artisan ui bootstrap
php artisan ui vue --auth

Laravel 8.x :

composer require laravel/ui
php artisan ui bootstrap
php artisan ui vue
php artisan ui bootstrap --auth

Laravel 6.x & 7.x

composer require laravel/ui "^2.4"
php artisan ui bootstrap
php artisan ui vue
php artisan ui bootstrap --auth

fix auth pages css

You must add this line to app.layout.blade.php:

<link href="{{ asset('vendor/starter-kit/css/app.css') }}" rel="stylesheet">

Laravel Scout

Some models have been integrated with scout and tntsearch driver, like Post model. You could use power of scout in these models.

If you are installing starter kit in an existing project, you can import models with this command:

php artisan scout:import \\Xmen\\StarterKit\\Models\\Post

For more information see scout document

Javascript

When customizing starterKit, you may use a variety of helpers that are globally available to your JavaScript components. The $,axios,chart,alertify are globally available.

Adding Javascript and css

You could add javascript and css file to dashboard with a name and file path.

\StarterKit::script('new-chart',resource_path('js/new-chart.js'));
\StarterKit::style('new-color',resource_path('scss/new-color.css'));

Update

After updating to a new StarterKit release, you should be sure to update StarterKit's JavaScript and CSS assets and language file using publish command and clear any cached views with view:clear. This will ensure the newly-updated StarterKit version is using the latest versions.

php artisan starter-kit:publish --force

notes

If you have problem with laravel mix, /vendor/xmen/starter-kit/package-sample.json could help you. BTW don't forget to have got backup form you package.json

Testing

composer test

Translate your language or words

 php artisan vendor:publish --provider="Translator\Framework\TranslatorServiceProvider" 

Security

If you discover any security related issues, please email sadeghpm@gmail.com instead of using the issue tracker.

Credits

Screenshot & Online tutorial (Persian)

screenshot

https://aparat.com/v/TAvPy

License

The MIT License (MIT). Please see License File for more information.