BTemplates.com

Advertisement

YoGiTeCh....... Powered by Blogger.

About Me

My photo
Mumbai, Maharastra, India

How to login with twitter in laravel 5.4

In this Tutorial will show you how to user login with twitter using laravel/socialite packages. social authentication is very importan...

Contact Form

Name

Email *

Message *

Search This Blog

Subscribe

Translate

Recent Posts

Posts

Pages

Blogger templates

Popular Posts

Thursday, 30 March 2017

How to login with facebook in laravel 5.4



In this Tutorial will show you how to user login with facebook using laravel/socialite packages. social authentication is very important because nowadays most of the users will connected with social network like facebook. so in this tutorial i will show you how to login with facebook in laravel 5.4.

1. Install Socialite Package:
In first step install socialite package. so, first open command prompt and run below command :

composer require laravel/socialite
2. Add Providers and aliases :
After install socialite package we should add providers and aliases in config file. so, open config/app.php file and add providers and aliases.
'providers' => [
....
Laravel\Socialite\SocialiteServiceProvider::class,
],
'aliases' => [
....
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
],
3.  Create Facebook App :
In this step we need facebook Credentials like facebook client id, secret key and redirect URls. so, go to https://developers.facebook.com/ and create facebook app.

4. Config/services.php :
After create app you can copy credentials like client id, secret key and redirect URls.
Now, go to config/services.php file and set facebook client id, secret and redirect URls.

return [
....
'facebook' => [
'client_id' => 'app id',
'client_secret' => 'add secret',
'redirect' => 'http://localhost:8000/auth/facebook/callback',
],
]
5. Add facebook_id column in your users table :

Schema::table('users', function ($table) {
$table->string('facebook_id');
});

6. Add route :
After adding facebook_id column in your users table first we have to add new route for facebook login. so, add below route in routes.php file.
Route::get('facebook', function () {
return view('facebookAuth');
});
Route::get('auth/facebook', 'Auth\RegisterController@redirectToFacebook');
Route::get('auth/facebook/callback', 'Auth\RegisterController@handleFacebookCallback');
7. RegisterController.php

app/Http/Controllers/Auth/RegisterController.php

<?php namespace App\Http\Controllers\Auth; use App\User; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Validator; use Illuminate\Foundation\Auth\RegistersUsers; use Socialite; use Auth; use Exception; class RegisterController extends Controller { /* |-------------------------------------------------------------------------- | Register Controller |-------------------------------------------------------------------------- | | This controller handles the registration of new users as well as their | validation and creation. By default this controller uses a trait to | provide this functionality without requiring any additional code. | */ use RegistersUsers; /** * Where to redirect users after registration. * * @var string */ protected $redirectTo = '/home'; /** * Create a new controller instance. * * @return void */ public function __construct() { $this->middleware('guest'); } /** * Get a validator for an incoming registration request. * * @param array $data * @return \Illuminate\Contracts\Validation\Validator */ protected function validator(array $data) { return Validator::make($data, [ 'name' => 'required|max:255', 'email' => 'required|email|max:255|unique:users', 'password' => 'required|min:6|confirmed', ]); } /** * Create a new user instance after a valid registration. * * @param array $data * @return User */ protected function create(array $data) { return User::create([ 'name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), ]); } public function redirectToFacebook() { return Socialite::driver('facebook')->redirect(); } public function handleFacebookCallback() { try { $user = Socialite::driver('facebook')->user(); $userModel = new User; $createdUser = $userModel->addNew($user); Auth::loginUsingId($createdUser->id); return redirect()->route('home'); } catch (Exception $e) { return redirect('auth/google'); } } }
8. Login.blade.php

resources/views/auth/login.blade.php

Tuesday, 28 March 2017

How to create CRUD(create, read, update, delete) operation in laravel



This tutorial will show you how to create CRUD (create, read, update, delete) operation in laravel 5.4. in this CRUD operation you can create post then if you want to edit particular post you can edit post and update it. suppose you don't want particular post you can also delete that post.

1. Create new Project:
we can create project using following command :
composer create-project --prefer-dist laravel/laravel Projectname
2. Create PostController :
now we should create new resource controller as PostController.
php artisan make:controller PostController --resource
app/Http/Controllers/PostController.php

<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\Requests; use App\Http\Controllers\Controller; use App\Post; class PostController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $search = \Request::get('search'); $posts = post::where('title','like','%'.$search.'%')->orderby('id')->paginate(5); return view('Posts.Index')->withPosts($posts); } /** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { return view('Posts.Create'); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { // validate the data $this->validate($request, array( 'title' => 'required|max:255', 'body' => 'required' )); // store in the database $post = new Post; $post->title = $request->title; $post->body = $request->body; $post->save(); //Session::flash('success','The blog post was successfully save!'); return redirect()->route('posts.show' , $post->id); } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $post = Post::find($id); return view('Posts.Show')->withPost($post); } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $post = Post::find($id); return view('Posts.Edit')->withPost($post); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { $this->validate($request, array( 'title' => 'required|max:255', 'body' => 'required' )); // store in the database $post = Post::find($id); $post->title = $request->title; $post->body = $request->body; $post->save(); //Session::flash('success','The blog post was successfully save!'); return redirect()->route('posts.show' , $post->id); } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $post = Post::find($id); $post->delete(); Session::flash('success','The Post was successfully deleted.'); return redirect()->route('posts.index'); } }
3. Create Post table and model :
Now we have to create one table which is Post table and one model so we can create table and model using following command :
php artisan make:model Post --migration
database/migration/CreatePostsTable

<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePostsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('posts', function (Blueprint $table) { $table->increments('id'); $table->string('title'); $table->text('body'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('posts'); } }
Now Go to app/Post
app/Post

<?php namespace App; use Illuminate\Database\Eloquent\Model; class Post extends Model { // }
4. Add Route :
Route::resource('posts', 'PostController');
5. Create Layouts/app file :
Ok, now we have to create layouts directory and create app.blade.php file inside that folder.

resources/views/layouts/app.blade.php

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Laravel CRUD operation</title> <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/css/bootstrap.css" rel="stylesheet"> </head> <body> <div class="container"> @yield('content') </div> </body> </html>
6. Create index.blade.php :
Ok, now we have to create posts directory and create index.blade.php file inside that folder.

resources/views/posts/index.blade.php

@extends('layouts.app') @section('title','| Show') @section('content') <style type="text/css"> .row { padding-top: 10px; } .icon { background: transparent; border: 0px; padding: 0; outline: 0; font-size: 20px; } .black { color: black; } .blue { color: blue; } .red { color: red; } .jumbotron { margin-bottom: 0px; background-color: skyblue; background-position: 0% 25%; background-size: cover; background-repeat: no-repeat; color: white; } .well{ margin-bottom: 0px; background-color: #ff7256; background-position: 0% 25%; background-size: cover; background-repeat: no-repeat; color: white; } </style> <script> $(document).ready(function(){ $('[data-toggle="tooltip"]').tooltip(); }); </script> <div class="row"> <div class="well"> <h2>My Posts <button type="button" class="btn btn-primary pull-right" data-toggle="modal" data-target="#myModal">Create New Post</button></h2> </div> <br> <div class="jumbotron"> <div class="col-md-offset-4 col-md-4 col-md-offset-4"> {!! Form::open(['method' => 'GET','url' =>'posts', 'class' =>'navbar-form navbar-left','role' =>'search']) !!} <div class="input-group custom-search-form"> <input type="text" name="search" class="form-control" placeholder="Search"> <span class="input-group-btn"> <button type="submit" class="btn btn-default"> <i class="glyphicon glyphicon-search icon"></i> </button> </span> </div> {!! Form::close() !!} </div> <table class="table table-bordered"> <tr> <th>#</th> <th>Title</th> <th>Body</th> <th>Created At</th> <th>Updated At</th> <th>Action</th> </tr> @foreach ($posts as $post) <tr> <td>{{ $post->id }}</td> <td>{{ $post->title }}</td> <td>{{ substr($post->body,0,50) }}{{ strlen($post->body) > 50 ?"..." : '' }}</td> <td>{{ $post->created_at }}</td> <td>{{ $post->updated_at }}</td> <td> {!! Form::open(['route' => ['posts.destroy',$post->id], 'method' => 'DELETE'])!!} <a href="{{ route('posts.edit', $post->id)}}" ><span class="glyphicon glyphicon-pencil black icon" data-toggle="tooltip" title="Edit Post"></span></a> &nbsp; &nbsp; <a href="{{ route('posts.show', $post->id)}}" ><span class="glyphicon glyphicon-eye-open icon blue" data-toggle="tooltip" title="View Post" data-placement="left"></span></a> &nbsp; &nbsp; <!-- <td align="right"><a href="{{ route('posts.destroy', $post->id)}}" class="btn btn-danger">Delete</a></td> --> {!! Form::button('<span class="glyphicon glyphicon-trash red " data-toggle="tooltip" title="Delete Post"></span>', ['type' => 'submit' ,'class' => 'icon' ]) !!} {!! Form::close() !!} </td> </tr> @endforeach </table> <div class="text-center"> {!! $posts->links(); !!} </div> </div> </div> @endsection <div class="modal fade" id="myModal" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title" style="text-align: center;">Create New Post</h4> </div> <div class="modal-body"> {!! Form::open(['route' => 'posts.store','data-parsley-validate' => '']) !!} {{ Form:: label('title','Title:')}} {{ Form::text('title',null,array('class' => 'form-control', 'required' => ''))}} {{ Form:: label('body','Body:')}} {{ Form:: textarea('body',null,array('class' => 'form-control', 'required' => ''))}} {{ Form:: submit('Create Post', array('class' => 'btn btn-success btn-lg btn-block', 'style' => 'margin-top: 20px;')) }} {!! Form::close() !!} </div> </div> </div> </div>
create second file inside posts folder

7. Create create.blade.php :
resources/views/posts/create.blade.php

@extends('layouts.app') @section('title','| Create New Post') <!-- @section('stylesheets') {!! Html::style('css/parsley.css')!!} @endsection --> @section('content') <style type="text/css"> .row { padding-top: 50px; } </style> <body style="background-image: url(bg.jpg);"> <div class="row"> <div class="col-md-offset-3 col-md-6"> <h1 style="text-align: center;">Create New Post</h1> <hr> {!! Form::open(['route' => 'posts.store','data-parsley-validate' => '']) !!} {{ Form:: label('title','Title:')}} {{ Form::text('title',null,array('class' => 'form-control', 'required' => ''))}} {{ Form:: label('body','Body:')}} {{ Form:: textarea('body',null,array('class' => 'form-control', 'required' => ''))}} {{ Form:: submit('Create Post', array('class' => 'btn btn-success btn-lg btn-block', 'style' => 'margin-top: 20px;')) }} {!! Form::close() !!} </div> </div><br> </body> @endsection <!-- @section('scripts') {!! Html::script('js/parsley.min.js')!!} @endsection -->

8. Create edit.blade.php :
resources/views/posts/edit.blade.php

@extends('layouts.app') @section('title','| Create New Post') @section('stylesheets') {!! Html::style('css/parsley.css')!!} @endsection @section('content') <style type="text/css"> .row { padding-top: 50px; } </style> <div class="row"> <div class="col-md-offset-3 col-md-6"> <h1 style="text-align: center;">Update Post</h1> <hr> {!! Form::model($post,['route' => ['posts.update',$post->id], 'data-parsley-validate' => '', 'method' => 'put']) !!} {{ Form:: label('title','Title:')}} {{ Form::text('title',null,array('class' => 'form-control', 'required' => ''))}} {{ Form:: label('body','Body:')}} {{ Form:: textarea('body',null,array('class' => 'form-control', 'required' => ''))}} {{ Form:: submit('Update Post', array('class' => 'btn btn-success btn-lg btn-block', 'style' => 'margin-top: 20px;')) }} {!! Form::close() !!} </div> </div><br> @endsection @section('scripts') {!! Html::script('js/parsley.min.js')!!} @endsection

9. Create show.blade.php :
resources/views/posts/show.blade.php

@extends('layouts.app') @section('title','| View Post') @section('content') <style type="text/css"> .row { padding-top: 50px; } </style> <div class="row"> <div class="jumbotron"> <a href="{{ route('posts.index')}}" class="btn btn-default">Back</a> <h1>{{ $post->title }}</h1> <p class="load" style="text-align: justify;">{{ $post->body }}</p> <table class="table"> <tr> <td>Created At:{{ $post->created_at }}</td> <td align="right">Updated At:{{ $post->updated_at }}</td> </tr> <tr> <td><a href="{{ route('posts.edit', $post->id)}}" class="btn btn-primary">Edit</a></td> <td align="right"> {!! Form::open(['route' => ['posts.destroy',$post->id], 'method' => 'DELETE'])!!} <!-- <td align="right"><a href="{{ route('posts.destroy', $post->id)}}" class="btn btn-danger">Delete</a></td> --> {!! Form::submit('Delete', ['class' => 'btn btn-danger ' ]) !!} {!! Form::close() !!} </td> </tr> </table> </div> </div> @endsection
Now you can run your project

How to upload single image in laravel



This tutorial will show you how to upload single image in laravel 5.4 version. Laravel 5.4 provide easy and simple way to create file uploading with validation. you can easily implement this on your laravel project.

1. Create new Project:
we can create project using following command :
composer create-project --prefer-dist laravel/laravel Projectname
2. Create SImageController :
php artisan make:controller SImageController
app/Http/Controllers/SImageController.php

<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\Requests; class SImageController extends Controller { public function singleimg() { return view('singleimg'); } public function singleimgpost(Request $request) { $this->validate($request, [ 'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', ]); $imageName = time().'.'.$request->image->getClientOriginalExtension(); $request->image->move(public_path('images'), $imageName); return back() ->with('success','Single Image Uploaded successfully.') ->with('path',$imageName); } }
3. Create singleimg.blade.php file:
we can easily create blade.php file just click on resources then right click on views folder and create new file.

resources/views/singleimg.blade.php

<!DOCTYPE html> <html> <head> <title>Single Image Upload</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> </head> <body> <nav class="navbar navbar-inverse navbar-fixed-top"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="/">Welcome</a> </div> <ul class="nav navbar-nav"> <li class="{{ Request::is( '/') ? 'active' : '' }}"><a href="/">Home</a></li> <li class="{{Request::is('singleimg')? 'active' : '' }}"><a href="">Single Image</a></li> </ul> </div> </nav> <div class="container"> <div class="well-primary" style="padding-top: 50px;"><h2>Dashboard</h2></div> <div class="panel panel-danger"> <div class="panel-heading"><h2 align="center">Single Image Upload</h2></div> <div class="panel-body"> @if (count($errors) > 0) <div class="alert alert-danger"> <strong>Whoops!</strong> There were some problems with your input.<br><br> <ul> @foreach ($errors->all() as $error) <li>{{ $error }}</li> @endforeach </ul> </div> @endif @if ($message = Session::get('success')) <div class="alert alert-success alert-block"> <button type="button" class="close" data-dismiss="alert">×</button> <strong>{{ $message }}</strong> </div> <div align="center"><img src="/images/{{ Session::get('path') }}"></div><br> @endif <form action="{{ url('singleimg') }}" enctype="multipart/form-data" method="POST"> {{ csrf_field() }} <div class="row" align="center"> <div class="col-md-12"> <input type="file" name="image" /><br> </div> <div class="col-md-12"> <button type="submit" class="btn btn-success">Image Upload</button> </div> </div> </form> </div> </div> </div> </body> </html>

4. Define Route :
you have to add two route in routes.php file.

Route::get('singleimg', 'SImageController@singleimg');
Route::post('singleimg', 'SImageController@singleimgpost');
Now you can run your project.

How to create quick admin panel in laravel



In This Tutorial i will show you how to create quick admin panel in laravel using Laravel Voyager admin package. we will implement laravel voyager admin package in laravel 5.4 version. Voyager admin package provide some functionality like as below :
                                                                   1. Media Manager
                                                                   2. Menu Builder
                                                                   3. Database Manager
                                                                   4. BREAD/CRUD Builder

1. Create new Project:
we can create project using following command :
composer create-project --prefer-dist laravel/laravel Projectname
2. Install Package :
Voyager is super easy to install. After creating your new Laravel application you can include the Voyager package with the following command:
composer require tcg/voyager

3. Database Configuration :
create a new database and add your database credentials to your .env file:
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
4. Add Providers :
add the Voyager service provider to the config/app.php file in the providers array:
.....
'providers' => [
....
TCG\Voyager\VoyagerServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,
]
.....
5. Install Voyager with and without dummy data:
install voyager without dummy data:
php artisan voyager:install
install voyager with dummy data:
php artisan voyager:install --with-dummy
6. Config/Voyager.php file :
in this step you have to run below command and you will find new file config/voyager.php for customize changes.
php artisan vender:public --tag=voyager_assets --force
7. Run laravel Project :
php artisan serve
8. Open below Link :
http://localhost:8000/admin/login
You will have default email and password as listed below :
Email:admin@admin.com
password:password
Suppose above credential do not match then follow below steps :
Create new admin user:
php artisan voyager:admin your@email.com --create
And you will be prompted for the users name and password.


Monday, 27 March 2017

How to design welcome profile page in laravel


In this video i will show you how to design welcome.blade.php page in laravel.

1. Create new Project:
we can create project using following command :
composer create-project --prefer-dist laravel/laravel Projectname
2. Create welcome.blade.php file:
we can easily create blade.php file just click on resources then right click on views folder and create new file. but once we create new project already created one welcome.blade.php file edit on that file.


welcome.blade.php 

@extends('layouts.app') @section('title','| Home') @section('content') <div class="container"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <div class="row jumbotron" style="margin: 15px; padding: 15px;"> <div class="col-sm-4"> <img src="img/pic1.jpg" class="img-responsive img-thumbnail" /> </div> <div class="col-sm-8"> <h3>This is My Heading.....</h3> <p>Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films. The son of actors Pankaj Kapur and Neelima Azeem, Kapoor was born in New Delhi. His parents separated when he was three, and he continued living with his mother. They moved to Mumbai when has was 10, where he joined Shiamak Davar's dance academy. </p> </div> </div> <div class="well" style="margin: 15px; padding: 15px;""> <h3>Welcome to My Blog</h3> </div> <div class="row"> <div class="col-sm-8" style="text-align: justify;"> <h3>Yogesh Yashwant Adigare Profile</h3> <p><img src="img/pic3.jpg" class="img-responsive img-thumbnail" width="250" align="left" vspace="5" hspace="5" />Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced [ʃaːɦɪd̪ kəˈpuːr]; born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films. The son of actors Pankaj Kapur and Neelima Azeem, Kapoor was born in New Delhi. His parents separated when he was three, and he continued living with his mother. They moved to Mumbai when has was 10, where he joined Shiamak Davar's dance academy.</p> <p>Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced [ʃaːɦɪd̪ kəˈpuːr]; born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films. The son of actors Pankaj Kapur and Neelima Azeem, Kapoor was born in New Delhi. His parents separated when he was three, and he continued living with his mother. They moved to Mumbai when has was 10, where he joined Shiamak Davar's dance academy. </p> <hr> <p><img src="img/pic7.jpg" class="img-responsive img-thumbnail" width="250" align="left" vspace="5" hspace="5" />Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced [ʃaːɦɪd̪ kəˈpuːr]; born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films. The son of actors Pankaj Kapur and Neelima Azeem, Kapoor was born in New Delhi. His parents separated when he was three, and he continued living with his mother. They moved to Mumbai when has was 10, where he joined Shiamak Davar's dance academy.</p> <p>Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced [ʃaːɦɪd̪ kəˈpuːr]; born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films. The son of actors Pankaj Kapur and Neelima Azeem, Kapoor was born in New Delhi. His parents separated when he was three, and he continued living with his mother. They moved to Mumbai when has was 10, where he joined Shiamak Davar's dance academy. Shahid Kapoor was born in New Delhi on 25 February 1981 to actor Pankaj Kapur and actor-dancer Neelima Azeem.[1][2] His parents divorced when he was three years old; his father shifted to Mumbai (and married the actress Supriya Pathak) and Kapoor continued living in Delhi with his mother and maternal grandparents.[3][4] His grandparents were journalists for the Russian magazine Sputnik, and Kapoor was particularly fond of his grandfather: "He would walk me to school every single day. He would talk to me about dad, with whom he shared a great relationship, and read out his letters to me."[3] His father, who was then a struggling actor in Mumbai, would visit Kapoor only once a year on his birthday.Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced [ʃaːɦɪd̪ kəˈpuːr]; born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films. </p> </div> <div class="col-sm-4"> <div class="panel panel-primary"> <div class="panel-heading"> Latest News </div> <div class="panel-body"> <p><img src="img/pic2.jpg" class="img-responsive img-thumbnail" width="100" align="left" hspace="3" vspace="3" />Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced [ʃaːɦɪd̪ kəˈpuːr]; born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films. </p> </div> <div class="panel-body"> <p><img src="img/pic4.jpg" class="img-responsive img-thumbnail" width="100" align="left" hspace="3" vspace="3" />Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced [ʃaːɦɪd̪ kəˈpuːr]; born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films. </p> </div> <div class="panel-body"> <p><img src="img/pic5.jpg" class="img-responsive img-thumbnail" width="100" align="left" hspace="3" vspace="3" />Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced [ʃaːɦɪd̪ kəˈpuːr]; born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films. </p> </div> <div class="panel-body"> <p><img src="img/pic10.jpg" class="img-responsive img-thumbnail" width="100" align="left" hspace="3" vspace="3" />Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced [ʃaːɦɪd̪ kəˈpuːr]; born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films. </p> </div> </div> </div> </div> <div class="row"> <div class="col-sm-4"> <div class="panel panel-primary"> <div class="panel-heading"> Yogesh Yashwant Adigare 1 </div> <div class="panel-body"> <p><img src="img/pic6.jpg" class="img-responsive img-thumbnail" width="100" align="left" vspace="3" hspace="3"> Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced [ʃaːɦɪd̪ kəˈpuːr]; born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films. </p> </div> </div> </div> <div class="col-sm-4"> <div class="panel panel-success"> <div class="panel-heading"> Yogesh Yashwant Adigare 2 </div> <div class="panel-body"> <p><img src="img/pic8.jpg" class="img-responsive img-thumbnail" width="100" align="left" vspace="3" hspace="3">Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced [ʃaːɦɪd̪ kəˈpuːr]; born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films.</p> </div> </div> </div> <div class="col-sm-4"> <div class="panel panel-danger"> <div class="panel-heading"> Yogesh Yashwant Adigare 3 </div> <div class="panel-body"> <p><img src="img/pic9.jpg" class="img-responsive img-thumbnail" width="100" align="left" vspace="3" hspace="3">Yogesh is an Indian masculine given name. The Sanskrit word yogeśa is a compound of the words yoga and īśa and has the meaning "master of yoga". It has also been used to refer to Shiva.Shahid Kapoor (pronounced [ʃaːɦɪd̪ kəˈpuːr]; born 25 February 1981), also known as Shahid Khattar, is an Indian actor who appears in Hindi films.</p> </div> </div> </div> </div> <!-- <div class="row"> <div class="col-md-10 col-md-offset-1"> <div class="panel panel-default"> <div class="panel-heading">Welcome</div> <div class="panel-body"> Your Application's Landing Page. </div> </div> </div> </div> --> </div> @endsection

3. Create PageController.php

public function getindex() { return view('Pages.welcome'); }

4. Create route.php

Route::get('/', 'PageController@getindex');