Convert Figma logo to code with AI

rappasoft logolaravel-boilerplate

The Laravel Boilerplate Project - https://laravel-boilerplate.com

5,585
1,578
5,585
5

Top Related Projects

78,107

Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation for your next big idea — freeing you to create without sweating the small things.

Associate users with roles and permissions

The power of webpack, distilled for the rest of us.

Debugbar for Laravel (Integrates PHP Debug Bar)

2,810

Minimal Laravel authentication scaffolding with Blade, Vue, or React + Tailwind.

2,542

Laravel UI utilities and presets.

Quick Overview

Laravel Boilerplate is a comprehensive starter kit for Laravel applications. It provides a solid foundation with pre-configured authentication, user management, role-based access control, and a clean, responsive frontend using Bootstrap 5. This project aims to accelerate Laravel development by offering a robust set of features out of the box.

Pros

  • Extensive feature set including user management, role-based permissions, and social authentication
  • Well-documented and actively maintained
  • Includes both frontend (Bootstrap 5) and backend (Laravel) components
  • Follows Laravel best practices and coding standards

Cons

  • May include more features than needed for simple projects, potentially leading to bloat
  • Customization might require in-depth knowledge of the boilerplate structure
  • Regular updates may necessitate careful merging to avoid conflicts with custom modifications
  • Learning curve for developers unfamiliar with the specific structure and conventions used

Code Examples

  1. User creation with roles:
$user = User::create([
    'name' => 'John Doe',
    'email' => 'john@example.com',
    'password' => 'password',
]);
$user->assignRole('administrator');
  1. Checking user permissions:
if ($user->can('edit articles')) {
    // User can edit articles
}
  1. Creating a new announcement:
Announcement::create([
    'area' => 'frontend',
    'type' => 'info',
    'message' => 'Welcome to our new website!',
    'enabled' => true,
]);

Getting Started

  1. Clone the repository:

    git clone https://github.com/rappasoft/laravel-boilerplate.git
    
  2. Install dependencies:

    composer install
    npm install && npm run dev
    
  3. Copy .env.example to .env and configure your environment variables.

  4. Generate application key:

    php artisan key:generate
    
  5. Run migrations and seed the database:

    php artisan migrate --seed
    
  6. Start the development server:

    php artisan serve
    

Visit http://localhost:8000 to see your application running.

Competitor Comparisons

78,107

Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation for your next big idea — freeing you to create without sweating the small things.

Pros of Laravel

  • Lightweight and minimal, providing a clean slate for custom development
  • Official Laravel repository, ensuring up-to-date core framework features
  • Ideal for developers who prefer building from scratch or have specific requirements

Cons of Laravel

  • Lacks pre-built authentication, admin panel, and user management features
  • Requires more initial setup time for common functionalities
  • May need additional packages for advanced features like role-based access control

Code Comparison

Laravel (basic routing):

Route::get('/', function () {
    return view('welcome');
});

Laravel Boilerplate (advanced routing with middleware):

Route::group(['namespace' => 'Frontend', 'as' => 'frontend.'], function () {
    includeRouteFiles(__DIR__.'/Frontend/');
});

Laravel Boilerplate offers a more structured approach to routing, including namespacing and middleware groups, while Laravel provides a simpler starting point.

Summary

Laravel is best suited for developers who want complete control over their project structure and prefer to build features from the ground up. Laravel Boilerplate, on the other hand, provides a more feature-rich starting point with pre-built authentication, admin panel, and user management systems. The choice between the two depends on project requirements, development timeline, and personal preferences.

Associate users with roles and permissions

Pros of laravel-permission

  • Focused solely on role and permission management, making it lightweight and easy to integrate
  • Extensive documentation and community support
  • Highly customizable and flexible for various use cases

Cons of laravel-permission

  • Requires additional setup for user authentication and other boilerplate features
  • Less out-of-the-box functionality compared to a full boilerplate solution

Code Comparison

laravel-permission:

$user->givePermissionTo('edit articles');
$user->assignRole('writer');
$user->hasPermissionTo('edit articles');

laravel-boilerplate:

$user->attachRole($role);
$user->attachPermission($permission);
$user->hasAccess('edit.articles');

Summary

laravel-permission is a specialized package for managing roles and permissions in Laravel applications. It offers a lightweight and flexible solution with extensive documentation. However, it requires additional setup for other boilerplate features.

laravel-boilerplate provides a more comprehensive starting point for Laravel projects, including user authentication and other common features. While it may be less flexible in terms of permission management, it offers a more complete out-of-the-box solution for rapid development.

The choice between these repositories depends on project requirements and developer preferences. laravel-permission is ideal for projects needing fine-grained control over permissions, while laravel-boilerplate is better suited for quickly bootstrapping a full-featured Laravel application.

The power of webpack, distilled for the rest of us.

Pros of Laravel Mix

  • Focused specifically on asset compilation and bundling
  • Simpler configuration for common front-end tasks
  • Regularly updated and maintained by the Laravel team

Cons of Laravel Mix

  • Limited to asset management, not a full application boilerplate
  • Requires additional setup for complete Laravel projects
  • Less opinionated about project structure and best practices

Code Comparison

Laravel Mix configuration:

mix.js('resources/js/app.js', 'public/js')
   .sass('resources/sass/app.scss', 'public/css')
   .version();

Laravel Boilerplate route definition:

Route::group(['namespace' => 'Backend', 'prefix' => 'admin', 'as' => 'admin.', 'middleware' => 'admin'], function () {
    Route::get('dashboard', 'DashboardController@index')->name('dashboard');
});

Summary

Laravel Mix is a streamlined tool for asset compilation in Laravel projects, offering easy configuration for common front-end tasks. It's regularly updated but focuses solely on asset management.

Laravel Boilerplate provides a more comprehensive starting point for Laravel applications, including authentication, user management, and predefined project structure. However, it may be more opinionated and require more effort to customize.

Choose Laravel Mix for simpler projects or when you need flexibility in your application structure. Opt for Laravel Boilerplate when you want a more complete starting point with built-in features and best practices.

Debugbar for Laravel (Integrates PHP Debug Bar)

Pros of Laravel Debugbar

  • Lightweight and focused on debugging, with minimal impact on application performance
  • Provides real-time insights into queries, exceptions, and request data
  • Easy to integrate into existing Laravel projects without major modifications

Cons of Laravel Debugbar

  • Limited to debugging functionality, not a full-featured boilerplate
  • Requires manual configuration for advanced features
  • May not be suitable for production environments without proper setup

Code Comparison

Laravel Debugbar:

use Barryvdh\Debugbar\Facade as Debugbar;

Debugbar::info($object);
Debugbar::error('Error!');
Debugbar::warning('Watch out…');
Debugbar::addMessage('Another message', 'mylabel');

Laravel Boilerplate:

// No direct equivalent, as it's a full boilerplate
// Example of a typical controller in the boilerplate
use App\Http\Controllers\Controller;

class ExampleController extends Controller
{
    public function index()
    {
        return view('example.index');
    }
}

Laravel Debugbar focuses on providing debugging tools, while Laravel Boilerplate offers a complete starting point for Laravel applications with pre-configured features and structure. The choice between them depends on whether you need a debugging tool or a full application template.

2,810

Minimal Laravel authentication scaffolding with Blade, Vue, or React + Tailwind.

Pros of Breeze

  • Lightweight and minimalistic, providing a clean starting point
  • Officially maintained by Laravel, ensuring compatibility and updates
  • Integrates seamlessly with Laravel's ecosystem and best practices

Cons of Breeze

  • Limited features out-of-the-box compared to Laravel Boilerplate
  • Requires more manual setup for advanced functionality
  • Less suitable for complex applications without additional customization

Code Comparison

Laravel Boilerplate:

// app/Http/Controllers/Backend/DashboardController.php
public function index()
{
    return view('backend.dashboard');
}

Breeze:

// routes/web.php
Route::get('/dashboard', function () {
    return view('dashboard');
})->middleware(['auth'])->name('dashboard');

Laravel Boilerplate provides a more structured backend setup, while Breeze offers a simpler, route-based approach. Laravel Boilerplate includes a dedicated backend controller, whereas Breeze uses a closure in the routes file for the dashboard.

Laravel Boilerplate offers a comprehensive set of features and a robust admin panel, making it suitable for larger projects. Breeze, on the other hand, provides a minimal authentication scaffolding, allowing developers to build upon it as needed. The choice between the two depends on the project's complexity and requirements.

2,542

Laravel UI utilities and presets.

Pros of Laravel UI

  • Lightweight and minimalistic, focusing solely on basic authentication scaffolding
  • Official Laravel package, ensuring compatibility and long-term support
  • Easy to customize and extend without removing unnecessary features

Cons of Laravel UI

  • Limited features compared to Laravel Boilerplate's comprehensive setup
  • Requires more manual setup for advanced functionality like user roles and permissions
  • Lacks pre-built admin panel and dashboard components

Code Comparison

Laravel UI (basic auth routes):

Auth::routes();

Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');

Laravel Boilerplate (auth routes with additional features):

Route::group(['namespace' => 'Auth', 'as' => 'auth.'], function () {
    includeRouteFiles(__DIR__.'/auth');
});

Route::group(['middleware' => 'auth'], function () {
    includeRouteFiles(__DIR__.'/backend');
});

Laravel UI provides a simpler starting point for authentication, while Laravel Boilerplate offers a more comprehensive setup with additional features and structure out of the box. The choice between them depends on project requirements and desired level of pre-built functionality.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Laravel Boilerplate (Current: Laravel 8.*) (Demo)

Latest Stable Version Latest Unstable Version
StyleCI Tests
GitHub contributors GitHub stars

Enjoying this project? Buy me a beer 🍺

Demo Credentials

Admin: admin@admin.com
Password: secret

User: user@user.com
Password: secret

Official Documentation

Click here for the official documentation

Slack Channel

Please join us in our Slack channel to get faster responses to your questions. Get your invite here: https://laravel-5-boilerplate.herokuapp.com

Introduction

Laravel Boilerplate provides you with a massive head start on any size web application. Out of the box it has features like a backend built on CoreUI with Spatie/Permission authorization. It has a frontend scaffold built on Bootstrap 4. Other features such as Two Factor Authentication, User/Role management, searchable/sortable tables built on my Laravel Livewire tables plugin, user impersonation, timezone support, multi-lingual support with 20+ built in languages, demo mode, and much more.

Issues

If you come across any issues please report them here.

Contributing

Thank you for considering contributing to the Laravel Boilerplate project! Please feel free to make any pull requests, or e-mail me a feature request you would like to see in the future to Anthony Rappa at rappa819@gmail.com.

Security Vulnerabilities

If you discover a security vulnerability within this boilerplate, please send an e-mail to Anthony Rappa at rappa819@gmail.com, or create a pull request if possible. All security vulnerabilities will be promptly addressed.

License

MIT: http://anthony.mit-license.org