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

Tuesday, 28 March 2017

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');




How to create chat application in laravel


In this video, i will show you how to Building simple chat application using Laravel. This is a tutorial to help you add a chat functionality to your Laravel web application.


How to Create Chat Application in laravel project
to follow this steps:

1. Create ChatController.php

we can create ChatController Using following Command :
 php artisan make:controller ChatController
2. Create Chat.php model

we can easily create model using following command :
 php artisan make:model Chat --migration  
3. Create like.php model

we can create model using following command :
 php artisan make:model like --migration  
4. Create Dashboard.blade.php
if you want to create blade.php file just go to resources folder and then right click on views folder and create new file and give name as Dashboard.blade.php



How to Create Project in Laravel




This is my first application tutorial. how to create or build project in laravel. this video will help you while creating a new project in laravel 5.

1. Install laravel :
https://laravel.com/

2. Create Project :
composer create-project --prefer-dist laravel/laravel Projectname

3. Local Development Server :

If you have PHP installed locally and you would like to use PHP's built-in 
development server to serve your application, you may use the serve Artisan command. 
This command will start a development server at http://localhost:8000:
php artisan serve

4. Quick Authentication :
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




Wednesday, 22 March 2017

Wednesday, 22 February 2017