DEV Community

Cover image for ๐Ÿ›ฃ Build Laravel Web Applications faster than ever , Easy to install , Effortless to customize ๐Ÿ‘‹.
Yasser Ameur el idrissi
Yasser Ameur el idrissi

Posted on • Updated on

๐Ÿ›ฃ Build Laravel Web Applications faster than ever , Easy to install , Effortless to customize ๐Ÿ‘‹.

Laravel is an incredible framework built by Taylor Otwell that combines powerful web development features, extensive documentation and an active community .In this tutorial we are going to build a fullstack application complete with an admin panel using laravelDash.

What is Laravel Dashboard ?

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. Laravel Dashboard or LaravelDash provides a powerful user interfaces for CRUD (create, read, update, delete) operations for Laravel applications. It offers additonal features including Charts , Panel Management , Settings , Payment System and Super Simple WYSIWYG โ€ฆ

Minute 1: Create the Laravel application

we assume that you have been able to set up your development environment. There are two ways to install Laravel project

  • Via Laravel Installer
  • Via Composer Create-Project

I will be using via composer to create new project

composer create-project --prefer-dist laravel/laravel blog 
Enter fullscreen mode Exit fullscreen mode

Laravel provides a quick way to scaffold all of the routes and views you need for authentication using one simple command:

php artisan make:auth
Enter fullscreen mode Exit fullscreen mode

Minute 2: 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
Enter fullscreen mode Exit fullscreen mode

Minute 3: Install and Configure laravelDash

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

composer require yal/laraveldash
Enter fullscreen mode Exit fullscreen mode

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

/*
 * Laravel dashboard Service Provider
 */
 \Yasser\LaravelDashboard\DashboardServiceProvider::class,
Enter fullscreen mode Exit fullscreen mode

Next, you need to publish the laravelDash configuration file:

php artisan vendor:publish --provider="Yasser\LaravelDashboard\DashboardServiceProvider" --tag="config"
Enter fullscreen mode Exit fullscreen mode

Minute 4: Running Migrations and Defining Relationships

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

php artisan migrate
Enter fullscreen mode Exit fullscreen mode

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

<?php

namespace App;

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Yasser\LaravelDashboard\Traits\UserRelation;

class User extends Authenticatable
{
    use Notifiable,UserRelation;

}
Enter fullscreen mode Exit fullscreen mode

Minute 5: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 and then head to http://localhost:8000/Dashboard

Whether youโ€™re helping us fix bugs, improve the docs, or spread the word, weโ€™d love to have you as part of the LaravelDash community! ๐Ÿ’ช๐Ÿ’œ See CONTRIBUTING.md for more information on what weโ€™re looking for and how to get started.

GitHub: https://github.com/getspooky/laravelDash

Top comments (0)