Get Started

This documentation is designed for beginners who want to get started with laravel dashboard from scratch. It assume that you have prior experience with Laravel framework . This documentation covers getting up and running with laravel dashboard. After reading this guide, you will know:

  1. How to install and how configure laravelDash.
  2. The general layout of laravelDash.
  3. How to customize Routes , Views , Controllers and Events.
  4. How to contribute to laravelDash.

About

Developers are lazy. No, I’m not kidding—they work hard to create systems that help them avoid more work in the future. Especially, repetitive work. And there are quite extreme examples now—we don’t need to write code anymore; it is being generated for us. laravelDash is a beautifully designed administration panel for Laravel. It offers additonal features including Charts, Panel Management, Settings , Payment System and more.

Installation

Before you install laravelDash, you should check to make sure that your system has the proper prerequisites installed. These include

  1. Laravel Framework 5.4+
  2. Composer
  3. Laravel Mix
  4. Node.js & NPM

laravelDash is super easy to install. After creating your new Laravel application you can include the package with the following command:

              
                $ composer require yal/laraveldash
              
            

Configuration

Firstly, make sure to create a new database and add your database credentials to your .env file :

              
                APP_URL=http://localhost
                DB_HOST=localhost
                DB_DATABASE=homestead
                DB_USERNAME=homestead
                DB_PASSWORD=secret
              
            

laravelDash will automatically register its service provider if you are using Laravel >=5.5. If you are using Laravel dashboard with Laravel 5.3 or 5.4, add Laravel dashboard's service provider in your application's config/app.php file:

              
                /*
                |--------------------------------------------------------------------------
                | Autoloaded Service Providers
                |--------------------------------------------------------------------------
                |
                | The service providers listed here will be automatically loaded on the
                | request to your application. Feel free to add your own services to
                | this array to grant expanded functionality to your applications.
                |
                */
                'providers' => [ yal\laraveldash\Providers\DashboardServiceProvider::class, ]
              
            

Next, you need to publish the laraveldash configuration file:

              
                php artisan vendor:publish --provider="yal\laraveldash\Providers\DashboardServiceProvider" --tag="config"
              
            

This is the default content of the config file that will be published as config/laraveldash.php:


Defining Relationships

Database tables are often related to one another. For example, a blog post may have many comments, or an order could be related to the user who placed it. Eloquent makes managing and working with these relationships easy. so go to App\User.php and add UserRelation.

              
                  namespace App; 
                  use Illuminate\Notifications\Notifiable; 
                  use Illuminate\Foundation\Auth\User as Authenticatable; 
                  use yal\laraveldash\Traits\UserRelation; 
                  class User extends Authenticatable { 
                      use Notifiable,UserRelation; 
                  }
              
            

Routing

After running php artisan route:list you will see a few new routes that have been added to your project which look like the following:

URI HTTP verbs
Dashboard GET
Manage GET
post GET-POST-PUT
Settings GET-POST
Users GET-POST
Checkout GET
Store GET-POST

Defining Resources

By default, laraveldash resources are stored in the resources directory of your application. You may generate a new resource using the command:

              
                php artisan laraveldash:resource {name}
              
            

Migrations

Generated migrations are regular Laravel migrations , Run the migrations with:

              
                php artisan migrate
              
            

Stripe Payment

Stripe is a very popular and secure internet payment gateway company which helps to accept payment worldwide. Stripe provide really nice development interface to start and you don’t have to pay subscription charges to learn it provides free developer account, before starting to code in your app. laraveldash integrate Stripe , we need to set stripe key and secret. so first you can go on Stripe website and create development stripe account key and secret and add bellow:

              
                STRIPE_KEY=
                STRIPE_SECRET=
              
            

Yah! You're on LaravelDash

To see it, you need to start a web server on your development machine. You can do this by running the following command: :

              
                php artisan serve
              
            
Open a browser window and navigate to http://localhost:8000. You should see the laravelDash default information page:

Contribute on GitHub

The biggest core feature we'd like to provide is an enjoyable development experience. Developers like you can help by contributing to rich and vibrant documentation, issuing pull requests to help us cover niche use cases, and to help sustain what you love about laravelDash. See CONTRIBUTING.md for more information on what we're looking for and how to get started.


Support Us

The people who support laravelDash do so for the love of open source, our users and ecosystem, and most importantly, pushing the web forward together. Because of our Open Collective model for funding and transparency, we are able to funnel support and funds through contributors, dependent projects, and the contributor and core teams. To make a donation, simply click the button below...