Laravel Template | Laravel Admin Panel | Laravel Blade Template - PowerPoint PPT Presentation

About This Presentation

Laravel Template | Laravel Admin Panel | Laravel Blade Template


Team Josh fills a creative content in the template and the features. We are having a enthusisatic members who always care about the quality of the product but not quantity. We are a team built with creativty , updated knowledge on the latest technology releases and the dedication towards the work. Our product speaks our hardwork, it crossed the sale count of 1500 and still remains as a hot cake in the envanto market. Josh admin template built on Laravel latest version has got more popularity because of its rich quality design and the components included. We accept designing of all type of Web templates as per the requirements. Team Josh is a hub of new creative works! – PowerPoint PPT presentation

Number of Views:1975


Transcript and Presenter's Notes

Title: Laravel Template | Laravel Admin Panel | Laravel Blade Template

What is Laravel?
  • Laravel is an open source MVC PHP Framework under
    MIT License

MVC Architecture
  • Model Model deals with backend logical
    structure of the application such as data base
    records. In laravel it is denoted as Eloquent
  • View View deals with frontend such as the HTML,
    CSS. In laravel it works with Blade Template
    Engine and denoted as View.
  • Controller Model and View can be communicated
    through Controllers. In laravel it is denoted as

MVC Architecture
Installing Laravel
  • Requirements
  • The Laravel framework has a few system
  • PHP version should be 5.5.9 or greater
  • Apache or any other compatible web server
  • Datatabase like MySQL
  • Composer dependency manager
  • IDE Tool Such as PHP Storm or Any Editor like
    Sublim Text, Notepad.

Installing Laravel
  • In Linux Apache, MySQL PHP can be installed
    through terminal
  • apt-get install php5-common libapache2-mod-php5
    php5-cli php5-mysql php5-curl

Installing Laravel
  • To Check PHP
  • use php -v at terminal to check PHP version

Or else use localhost to check php information
Installing Laravel
Installing Laravel
  • Laravel utilizes Composer to manage its
    dependencies. To install composer through
  • curl -sS https//
  • mv composer.phar /usr/local/bin/composer
  • composer global require "laravel/installer1.1"

Installing Laravel
Installing Laravel
  • To check Composer

Create Laravel App
  • To Create Laravel Application through terminal
  • composer create-project laravel/laravel

Create Laravel App
  • Browse to the following URL in your web browser.
  • http//localhost/project-name/public/

Laravel directory structure
  • After crating laravel first app you will notice
    there is huge laravel directory structure

Laravel directory structure
  • Let us discuss the directory structure in brief
  • It comes as no surprise that all Laravel projects
    have essentially the same directory structure -
    one in which every file has its designated place.
    By gently forcing this directory structure upon
    developers, Laravel ensures that your work is
    semi-automatically organized the Laravel way.
  • As you can see, this standard directory structure
    consists of quite a few subdirectories. This
    wealth of subdirectories can be overwhelming at
    first, but well explore them one by one. Most of
    your work will happen in the app/ folder, but
    heres a basic rundown on the function of each of
    the files and folders

Laravel directory structure
  • Top-level Folders and their purpose
  • /app/ Contains the controllers, models, views and
    assets for your application. This is where the
    majority of the code for your application will
    live. You will be spending most of your time in
    this folder!
  • /public/ The only folder seen to the world as-is.
    This is the directory that you have to point your
    web server to. It contains the bootstrap file
    index.php which jump-starts the Laravel framework
    core. The public directory can also be used to
    hold any publicly accessible static assets such
    as CSS, Javascript files, images and other files.
  • /vendor/ A place for all third-party code. In a
    typical Laravel application, this includes the
    Laravel source code and its dependencies, and
    plugins containing additional prepackaged

Laravel directory structure
  • /app/Http/routes.php
  • Suppose routes.php file contains the below
    mentioned code
  • Routeget('/', function()
  • return view('welcome')
  • )
  • When you browse http//localhost/project-name/publ
  • It goes to routes.php and finds get request and
    as a result it goes to return view('welcome'). So
    it then moves to view directory.

Laravel directory structure
  • /resources/views/welcome.blade.php
  • Blade is the simple, yet powerful templating
    engine provided with Laravel.
  • The complete user viewable contents can be placed
  • It uses html, css,javascript and php

Laravel directory structure
  • Suppose routes.php has the below code
  • Routeresource('photo', 'PhotoController')
  • It goes to App/Http/Controllers/ directory and
    finds PhotoController.php which contains logic
    for backend data.
  • This single route declaration creates multiple
    routes to handle a variety of RESTful actions on
    the photo resource.

Laravel directory structure
  • Methods or Actions Handled By Resource Controller
  • Verb Path Action
    Route Name
  • GET /photo index
  • GET /photo/create create
  • POST /photo store
  • GET /photo/photo show
  • GET /photo/photo/edit edit
  • PUT/PATCH /photo/photo update
  • DELETE /photo/photo destroy

Laravel directory structure
  • PhotoController.php
  • class PhotoController extends Controller
  • public function index()
  • return view('welcome')
  • public function create() //logic for create
  • public function store() //logic for store photo
  • public function show() //logic for show photo
  • public function edit() //logic for edit photo
  • public function update() //logic for update
  • public function destroy() //logic for destroy

Josh- An Example Laravel App
  • Want to be more familiar with Laravel ?
  • You can go for Josh which is an excellent admin
    template for Laravel framework.
  • This template made with rich features
  • Responsive clean design
  • User friendly
  • Laravel
  • HTML5
  • CSS3
  • Bootstrap 3.3.4

Josh- Installation
  • Josh doesn't ship with whole laravel files, so
    you need to intall laravel first.
  • install laravel using composer by executing
    composer create-project laravel/laravel
  • Next setup Database
  • Laravel 5 ships with .env file.
  • Incase, you don't find it in root folder of your
    laravel installation,
  • execute following command in terminal to make
  • cp .env.example .env
  • then edit database, environment related details
    in that file.

Josh- Installation
  • Directory Permissions
  • Laravel 5.1 requires directories within the
    storage and the bootstrap/cache directories
    should be writable by your web server
  • Todo this run the below commands on terminal
  • chmod -R 775 storage
  • chmod 775 bootstrap/cache

Josh- Installation
  • Mail Setup
  • Laravel 5.1 stored all mail information in .env
    so setup details in .env
  • Still you need to set sender name and email
    details in config/mail.php
  • If you are testing locally or don't want to send
    any mails, then please set 'pretend' gt true, in
    config/mail.php at bottom of the page.

Josh- Installation
  • Copying Josh files
  • now copy files downloaded from
    late-front-end-crud/8754542to your laravel 5.1
  • updating autoload
  • composer should know some new files were added
    so that it can autoload them
  • Hit composer dump-autoload in terminal for that

Josh- Installation
  • Delete existing migration files
  • Since we are not relying on default migration
    tables, please remove following two files from
    database/migrations folder
  • 2014_10_12_000000_create_users_table.php
  • 2014_10_12_100000_create_password_resets_table.php
  • Otherwise you will get error at later stage of

Josh- Installation
  • Install Packages
  • We use good number of packages to provide great
    functionality without re-inventing wheel.
  • Now add below mentioned packages in
    composer.json in require array
  • "cartalyst/sentinel" "2.0.",
  • "laravelcollective/html" "5.1.",
  • "cviebrock/eloquent-sluggable" "dev-master",
  • "cviebrock/eloquent-taggable" "dev-master",
  • "yajra/laravel-datatables-oracle" "5.0"
  • update vendors
  • now hit composer update in terminal to
    download above packages.

Josh- Installation
  • Add service providers
  • Open config/app.php and add following lines in
    the providers array
  • Cartalyst\Sentinel\Laravel\SentinelServiceProvider
  • Collective\Html\HtmlServiceProviderclass,
  • Cviebrock\EloquentSluggable\SluggableServiceProvid
  • Cviebrock\EloquentTaggable\ServiceProviderclass,
  • yajra\Datatables\DatatablesServiceProviderclass

Josh- Installation
  • In the aliases array add following facades
  • 'Activation' gt Cartalyst\Sentinel\Laravel\Facad
  • 'Reminder' gt Cartalyst\Sentinel\Laravel\Facades
  • 'Sentinel' gt Cartalyst\Sentinel\Laravel\Facad
  • 'Form' gt Collective\Html\FormFacadecla
  • 'Html' gt Collective\Html\HtmlFacadecl
  • 'Datatables' gt yajra\Datatables\Datatablesclass

Josh- Installation
  • publish vendors
  • now we need to publish vendor files so that they
    will publish config files, migrations.
  • Excecute following command in command
  • php artisan sluggabletable blogs
  • php artisan taggabletable
  • php artisan vendorpublish
  • Now we need to add user, groups etc tables to
    database, to do so in your command prompt,
    execute following code
  • php artisan migrate
  • Note please check all files in
    database\migrations to know what fields are being

Josh- Installation
  • setting up config to use our model
  • since we have different requirements (extra
    fields in users table), we need to change
    sentinel config to use our user Model,
  • to do that open config/cartalyst.sentinel.php
  • at line 56, find
  • 'model' gt 'Cartalyst\Sentinel\Users\EloquentUser
  • replace it with
  • 'model' gt 'App\User',

Josh- Installation
  • Add admin user
  • As database tables have been setup, we need to
    add admin user to be able to login into adminCP.
  • Run following command in your command prompt
  • php artisan dbseed --classAdminSeeder
  • A default admin user with user with username and password admin will be created

Josh- Installation
  • user's profile pics will be uploaded into
  • So we need to provide write access for that
  • to do so, please run following command in your
    command prompt/terminal
  • chmod 775 public/uploads/users
  • chmod 775 public/uploads/blog
  • Finally,
  • Browse to http//localhost/josh_laravel51/public/

Go with Josh
Congratulations! You are ready to rock the world!!
For More Info Contact Us
For More Info Visit shadmin.c
Write a Comment
User Comments (0)