Laravel Starter is a Laravel 12.x based simple starter project. Most of the commonly needed features of an application like Authentication, Authorisation, Users and Role management, Application Backend, Backup, Log viewer are available here. It is modular, so you may use this project as a base and build your own modules. A module can be used in any Laravel Starter based project.
Here Frontend and Backend are completely separated with separate routes, controllers, and themes as well.
Please let me know your feedback and comments.
If you discover any security-related issues, please send an e-mail to Nasir Khan Saikat via [email protected] instead of using the issue tracker.
Check the following demo project. It is just a straight installation of the project without any modification.
Demo URL: https://laravel.nasirkhn.com
You may use the following account credentials to access the application backend.
User: [email protected]
Pass: secret
User: [email protected]
Pass: secret
For detailed information about seeding options and demo data management, see the Database Seeding section above.
Quick command to add demo data:
php artisan laravel-starter:insert-demo-dataUse --fresh to truncate existing data first:
php artisan laravel-starter:insert-demo-data --freshWe have created a number of custom commands for the project. The commands are listed below with a brief about their use of it.
To create a project use the following command, you have to replace the MODULE_NAME with the name of the module.
php artisan module:build MODULE_NAMEYou may want to use --force option to overwrite the existing module. if you use this option, it will replace all the existing files with the default stub files.
php artisan module:build MODULE_NAME --forcecomposer clear-allthis is a shortcut command to clear all cache including config, route, and more
We are now using Laravel Pint to make the code style stay as clean and consistent as the Laravel Framework. Use the following command to apply CS-Fix.
composer pintAlong with Laravel Pint, we are using prettier to format the blade templates. You can install the prettier extension in your favorite editor.
The following command will format the blade templates.
npm run formator if you are using yarn then you can use the following command.
yarn formatSeveral custom commands are available to add and update role-permissions. Please read the Role - Permission Wiki page, where you will find the list of commands with examples.
The Laravel Starter comes with several features which are the most common in almost all applications. It is a template project which means it is intended to be built in a way that it can be used for other projects.
It is a modular application, and some modules are installed by default. It will be helpful to use it as a base for future applications.
- Admin feature and public views are completely separated as
BackendandFrontendnamespace. - Major features are developed as
Modules. A module like Posts, Comments, and Tags are separated from the core features like User, Role, Permission
- User Authentication
- Social Login
- Github
- Build in a way adding more is much easier now
- User Profile with Avatar
- Role-Permissions for Users
- Dynamic Menu System
- Language Switcher
- Localization enabled across the project
- Backend Theme
- Bootstrap 5, CoreUI
- Fontawesome 6
- Dark Mode
- Frontend Theme
- Tailwind
- Fontawesome 6
- Dark Mode
- Article Module
- Posts
- Categories
- Tags
- Comments
- wysiwyg editor
- File browser
- Application Settings
- External Libraries
- Bootstrap 5
- Fontawesome 6
- CoreUI
- Tailwind
- Datatables
- Select2
- Date Time Picker
- Backup (Source, Files, Database as Zip)
- Log Viewer
- Notification
- Dashboard and details view
Follow the steps mentioned below to install and run the project. You may find more details about the installation in Installation Wiki.
- Open the terminal and run the following command, this will download and install the
Laravel Starterand run the post-installation commands.
composer create-project nasirkhan/laravel-starter- The default database is
sqlite, if you want to change please update the database settings at.envfile - To create a link from the storage directory, run the following command from the project root:
php artisan storage:link- If you run the
create-projectcommand fromLaravel Hardthen the site will be available at http://laravel-starter.test. You may create a virtualhost entry to access the application or runphp artisan servefrom the project root and visithttp://127.0.0.1:8000
After creating the new permissions use the following commands to update cashed permissions.
php artisan cache:forget spatie.permission.cache
This Laravel application provides flexible database seeding options to accommodate different development scenarios.
- Users, Roles & Permissions (
AuthTableSeeder) - Menu & Navigation (
MenuDatabaseSeeder)
These seeders create the core data required for the application to function properly.
- Posts (
PostDatabaseSeeder) - Categories (
CategoryDatabaseSeeder) - Tags (
TagDatabaseSeeder)
These seeders create sample content for development and testing purposes.
Seeds both essential data and dummy data:
php artisan migrate:fresh --seedOption A: Environment Variable
Set in your .env file:
SEED_DUMMY_DATA=falseThen run:
php artisan migrate:fresh --seedOption B: Custom Command
# Seed only essential data
php artisan db:seed-essential
# Fresh migration + essential data only
php artisan db:seed-essential --freshOption C: Runtime Environment Variable (PowerShell)
$env:SEED_DUMMY_DATA="false"; php artisan migrate:fresh --seedIf you already have essential data and only want to add dummy content:
php artisan db:seed --class="Modules\Post\database\seeders\PostDatabaseSeeder"
php artisan db:seed --class="Modules\Category\database\seeders\CategoryDatabaseSeeder"
php artisan db:seed --class="Modules\Tag\database\seeders\TagDatabaseSeeder"If you need to add or refresh demo data after initial setup:
php artisan laravel-starter:insert-demo-dataThis command inserts demo data for posts, categories, tags, and comments. Use the --fresh option to truncate existing data first:
php artisan laravel-starter:insert-demo-data --freshThis is separate from the seeding process and can be used anytime to populate or refresh demo content.
# Control dummy data seeding (default: true)
SEED_DUMMY_DATA=true- Essential seeders are safe for production (users, roles, menus)
- Dummy data seeders should typically be disabled in production
- Use
--forceflag for production environments:
php artisan db:seed-essential --fresh --forceIndividual modules can be enabled/disabled via modules_statuses.json:
{
"Post": true, // Dummy data module
"Category": true, // Dummy data module
"Tag": true, // Dummy data module
"Menu": true // Essential module
}During automated testing:
- Seeder output is suppressed to keep test logs clean
- Both essential and dummy data are seeded by default
- Override with
SEED_DUMMY_DATA=falsefor faster test execution
Development Setup
# Full development environment with sample content
php artisan migrate:fresh --seedProduction Deployment
# Production with only essential data
SEED_DUMMY_DATA=false php artisan migrate:fresh --seed --forceQuick Development Reset
# Reset with only essential data for clean slate
php artisan db:seed-essential --freshStaging Environment
# Add sample content to existing essential data
SEED_DUMMY_DATA=true php artisan db:seedThis project is configured with Laravel Sail (https://laravel.com/docs/sail). You can use all the docker functionalities here. To install using docker and sail:
- Clone or download the repository
- Go to the project directory and run
composer install - Create
.envfile by copying the.env-sail. You may use the command to do thatcp .env-sail .env - Update the database name and credentials in
.envfile - Run the command
sail up(consider adding this to your alias:alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail') - Run the command
sail artisan migrate --seed - Link storage directory:
sail artisan storage:link - Since Sail is already up, you can just visit http://localhost:80
Home Page
Login Page
Posts Page
Backend Dashboard








