PHPackages                             xmen/starter-kit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. xmen/starter-kit

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xmen/starter-kit
================

v3.3.1(2y ago)16471127MPL-2.0PHPPHP ^7.4|^8

Since Aug 29Pushed 2y ago5 watchersCompare

[ Source](https://github.com/4xmen/starterkit-for-laravel)[ Packagist](https://packagist.org/packages/xmen/starter-kit)[ Docs](https://gitgo.ir/4xmen/laravel-starter-kit)[ RSS](/packages/xmen-starter-kit/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (10)Dependencies (13)Versions (43)Used By (0)

Laravel Starter Kit
===================

[](#laravel-starter-kit)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7dd9ef077bde57681da3f69e7600f34db66c90fdc8506d990e0681dff61e084f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f786d656e2f737461727465722d6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xmen/starter-kit)[![Total Downloads](https://camo.githubusercontent.com/72b38fdeea27151329cf20a6cba805c676c47d19ca4d525e39b7b05dfcfb1683/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f786d656e2f737461727465722d6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xmen/starter-kit)

An Starter Kit For Laravel Projects.

Installation
------------

[](#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"
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
-----

[](#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 vue
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 &amp; 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

[](#fix-auth-pages-css)

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

```

```

### Laravel Scout

[](#laravel-scout)

Some models have been integrated with scout and [tntsearch](https://packagist.org/packages/teamtnt/laravel-scout-tntsearch-driver) 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](https://laravel.com/docs/7.x/scout)

### Javascript

[](#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

[](#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
------

[](#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
-----

[](#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`**

Add persian jdate &amp; fix pagination
--------------------------------------

[](#add-persian-jdate--fix-pagination)

```
// AppServiceProvider.php top of file
use Xmen\StarterKit\Helpers\TDate;

// in the boot function
public function boot()
{
    //
    Carbon::setLocale('fa_IR');

    Carbon::macro('jdate', function ($format) {
        $dt = new TDate();
        return $dt->PDate($format,self::this()->timestamp);
    });

    Paginator::useBootstrap();
}
```

### useage persion date

[](#useage-persion-date)

Then you can use your custom format like this everywhere.

```
$user->created_at->jdate('Y/m/d');
```

Testing
-------

[](#testing)

```
composer test
```

Translate your language or words
--------------------------------

[](#translate-your-language-or-words)

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

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [4xmen](https://github.com/4xmen)
- [SadeghPM](https://github.com/sadeghpm)
- [A1Gard](https://github.com/A1Gard)
- [All Contributors](../../contributors)

Screenshot &amp; Online tutorial (Persian)
------------------------------------------

[](#screenshot--online-tutorial-persian)

[![screenshot](screenshot.jpg)](screenshot.jpg)

```
https://aparat.com/v/TAvPy

```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 62.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~32 days

Recently: every ~17 days

Total

42

Last Release

765d ago

Major Versions

v1.9.0 → v2.0.62023-03-07

v2.2.0 → v3.0.02023-07-11

PHP version history (2 changes)v1.0PHP ^7.4

v2.0.6PHP ^7.4|^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ecb8440161efaed64e53693c2e1de411dfef84f383585392adc01b5b62e143c?d=identicon)[SadeghPM](/maintainers/SadeghPM)

![](https://avatars.githubusercontent.com/u/9222481?v=4)[A1Gard](/maintainers/a1gard)[@A1Gard](https://github.com/A1Gard)

![](https://www.gravatar.com/avatar/ad31d38714a6cb7e041ad77d1c76242b04a0a7304f7d6e9e74a02eccb2d2cccb?d=identicon)[xmen](/maintainers/xmen)

---

Top Contributors

[![A1Gard](https://avatars.githubusercontent.com/u/9222481?v=4)](https://github.com/A1Gard "A1Gard (56 commits)")[![SadeghPM](https://avatars.githubusercontent.com/u/9298600?v=4)](https://github.com/SadeghPM "SadeghPM (33 commits)")

---

Tags

4xmeneasy-to-setupeasy-to-uselaravellaravel-packagepersianstarter-kitxstackstarter-kitxmen

###  Code Quality

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/xmen-starter-kit/health.svg)

```
[![Health](https://phpackages.com/badges/xmen-starter-kit/health.svg)](https://phpackages.com/packages/xmen-starter-kit)
```

###  Alternatives

[revolution/self-ordering

Self Ordering System

2112.7k](/packages/revolution-self-ordering)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
