laravel

Server Requirements

The Laravel framework has a few system requirements. Of course, all of these requirements are satisfied by the Laravel Homestead virtual machine, so it’s highly recommended that you use Homestead as your local Laravel development environment.

However, if you are not using Homestead, you will need to make sure your server meets the following requirements:

  • PHP >= 7.1.3
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension
  • Ctype PHP Extension
  • JSON PHP Extension
  • Installing Laravel

    Laravel utilizes Composer to manage its dependencies. So, before using Laravel, make sure you have Composer installed on your machine.

    Via Laravel Installer

    First, download the Laravel installer using Composer:

    composer global require laravel/installer

    Make sure to place composer’s system-wide vendor bin directory in your $PATH so the laravel executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include:

    public function Register()
    {
    return view(‘user.register’);
    }

    public function RegisterStore(Request $request)
    {
    $UserData = User::create([
    ‘name’=>$request->name,
    ‘role_id’=>$request->role,
    ’email’=>$request->email,
    ‘password’=>bcrypt($request->password),
    ‘verify_token’=>Str::random(40),
    ]);

    //return $data;

    Mail::send(‘mail.mail-ui’, [‘data’ => $UserData], function ($m) use ($UserData) {
    $m->from(‘raminfotech13@gmail.com’, $UserData[‘name’]);
    $m->to($UserData[’email’],’Blog Website’)->subject(‘This is email confirmation mail ‘);
    });

    return redirect(‘Login’)->with(‘msg’,’Now kindly Verify Your Email Address’);
    }

    public function VerifyUser($email, $verifytoken)
    {
    $UserData = User::where([’email’=>$email, ‘verify_token’=>$verifytoken])->first();

    if($UserData)
    {
    $getData=User::where([’email’=>$email,’verify_token’=>$verifytoken])->update([‘status’=>’1’,’verify_token’=>NULL]);

    return redirect(‘Login’)->with(‘msg’, ‘Thanks for verification’);
    }
    else
    {
    return ‘User Not Found’;
    }
    }

    public function LogIn()
    {
    return view(‘user.login’);
    }

    public function LogInStore(Request $request){
    $this->validate($request,[
    ’email’ => ‘required’,
    ‘password’ => ‘required’
    ]);
    $credentials = [
    ’email’ => $request->email,
    ‘password’ => $request->password,
    ‘status’ => 1,
    ];

    $auth = auth()->guard(‘web’);

    if(!$auth->attempt($credentials))
    {
    return redirect(‘login-ui’)->with(‘msg’,’Sorry!!! details are incorrect.’);
    }
    else{

    if (Auth::user()->role_id === 1)
    {
    return redirect(‘admin-panel’);
    }

    elseif (Auth::user()->role_id === 2)
    {
    return redirect(‘user-panel’);
    }

    elseif (Auth::user()->role_id === 3)
    {
    return redirect(‘admin-panel’);
    }

    }

    }

    public function Logout()
    {
    session()->flush();
    return redirect(“login”);
    }

    public function UserPanel()
    {
    return view(‘user.user-dashboard’);
    }

 

public function InsertCategory(Request $request)
{
$validatedData = $request->validate([
‘catname’ => ‘required’,
‘catimg’ => ‘required|image|mimes:jpeg,png,jpg,gif,svg|max:2048’
]);

if (empty(Input::get(‘parentid’)) )
{
$parentname=Input::get(‘catname’);

$hold_cat_img=Input::file(‘catimg’);
$cat_new_img=rand() . ‘.’ . $hold_cat_img->getClientOriginalName();
$destination=’assets/img’;
$hold_cat_img->move($destination, $cat_new_img);

$parentVal = ParentCat::create([
‘parent_name’=>$parentname,
‘parent_img’=>$cat_new_img,
]);

//return $parentVal;

}
else
{
$childVal = ChildCat::create([
‘child_name’=>$request->catname,
‘parent_cat_id’=>$request->parentid,
]);

}
return redirect(‘create-category’)->with(‘msg’,’Parent Category Created’);
}

 

public function UpdateCategory(Request $request, $id)
{
ChildCat::where(‘id’,$id)->update([
‘child_name’=>$request->catname,
‘parent_cat_id’=>$request->parentcat,
]);

return redirect(‘cat-list’);
}

 

public function InsertProduct(Request $request){

$hold_cat_img=Input::file(‘pimage’);
$p_new_img=$hold_cat_img->getClientOriginalName();
$destination=’assets/img’;
$hold_cat_img->move($destination, $p_new_img);

$childVal = product::create([
‘product_name’=>$request->prodname,
‘product_image’=>$p_new_img,
‘parent_cat_id’=>$request->pid,
‘child_cat_id’=>$request->cid,
‘price’=>$request->prodprice,
‘payment’=>implode(‘,’, $request->payment),
‘specification’=>serialize($request->specification),
‘size’=>implode(‘,’, $request->size),
‘description’=>$request->description,
]);

return redirect(‘list-product’);
}

 

public function UpdateProduct(Request $request, $id){

//return $id;

/*Product::find($id)->update($request->all());*/

if ($request->pimage==null || $request->pimage==”)
{
$p_new_img=$request->prodhiddenimg;
}
else
{
$hold_cat_img=Input::file(‘pimage’);
$p_new_img=$hold_cat_img->getClientOriginalName();
$destination=’assets/img’;
$hold_cat_img->move($destination, $p_new_img);
}

product::where(‘id’,$id)->update([
‘product_name’=>$request->prodname,
‘product_image’=>$p_new_img,
‘parent_cat_id’=>$request->pid,
‘child_cat_id’=>$request->cid,
‘price’=>$request->prodprice,
‘payment’=>implode(‘,’, $request->payment),
‘specification’=>serialize($request->specification),
‘size’=>implode(‘,’, $request->size),
‘description’=>$request->description,
]);

return redirect(‘list-product’)->with(‘msg’,’Now kindly Verify Your Email Address’);
}

 

public function StatusSlider($id, $status)
{
$zero = 0;
$one = 1;

if ($status == 1)
{
Slider::where(‘id’,$id)->update([
‘status’=>$zero,
]);
}
else
{
Slider::where(‘id’,$id)->update([
‘status’=>$one,
]);
}

return redirect(‘list-slider’)->with(‘msg’,’Slider has been Updated’);

}

 

public function BlogList()
{
//$data = User::with(‘blog.image’,’blog.CommenFun’,’profile’)->get();
$data = User::with(‘ProfileFn’,’BlogFn.BlogImage’,’BlogFn.CommenFun’)->get();//Bulid connection as join, here //Bulid connection as join, here in the bracket we are calling the model function name.
//return $data;
return view(‘blog-list’)->with([‘getData’=>$data]);
}

public function BlogView($id)
{
//return $id; check what is getting….
$data = Blog::with(‘BlogImage’,’CommenFun.user’,’user’)->where(‘id’,$id)->first();/*Why not accepting after changing function name anything and getting null value*/
//return $data;
return view(‘blog-view’)->with([‘getData’=>$data]);
}

public function AdminWelcome()
{
$user = Auth::guard(‘web’)->user();
$userCount=User::count();/*we wrting here direct model name as model knowing*/
$blogCount=Blog::count();
$commentCount=Comment::count();
//return $userCount;

//return $user;
return view(‘admin-welcome’)->with([
‘user’=>$user,
‘userCount’=>$userCount,
‘blogCount’=>$blogCount,
‘commentCount’=>$commentCount,

]);
}

public function OddEven()
{
//$data = User::with(‘blog.image’,’blog.CommenFun’,’profile’)->get();
$data = Blog::with(‘BlogImage’,’CommenFun.user’,’user’)->get();//Bulid connection as join, here //Bulid connection as join, here in the bracket we are calling the model function name.
//return $data;
return view(‘odd-even’)->with([‘getData’=>$data]);
}

 

 

 

 

 

 

@extends(‘layout.master’)
@section(‘content’)

<div class=”container”>
<div class=”well well-lg”>
<h3 class=”text-center”>Enter Your Details</h3><hr>

<form class=”form-horizontal” action=”{{ url(‘blog-post’) }}” method=”post”>
@csrf
<div class=”form-group”>
<label for=”inputEmail3″ class=”col-sm-2 control-label”>BLog Title</label>
<div class=”col-sm-10″>
<input type=”text” class=”form-control” name=”title” placeholder=”BLog Title”>
</div>
</div>

<div class=”form-group”>
<label for=”inputEmail3″ class=”col-sm-2 control-label”>Blog Status</label>
<div class=”col-sm-10″>
<label class=”checkbox-inline”>
<input type=”checkbox” name=”show[]” value=”public”> Public
</label>
<label class=”checkbox-inline”>
<input type=”checkbox” name=”show[]” value=”private”> Private
</label>
</div>
</div>

<div class=”form-group”>
<label for=”inputEmail3″ class=”col-sm-2 control-label”>Location</label>
<div class=”col-sm-10″>
<select class=”form-control” name=”city”>
<option>Select city</option>
<option value=”delhi”>Delhi</option>
<option value=”mumbai”>Mumbai</option>
<option value=”kolkata”>Kolkata</option>
</select>
</div>
</div>

<div class=”form-group”>
<label for=”inputPassword3″ class=”col-sm-2 control-label”>Enter Details</label>
<div class=”col-sm-10″>
<textarea class=”form-control” rows=”5″ name=”details” placeholder=”Enter Details”></textarea>
</div>
</div>

<div class=”form-group”>
<label for=”inputEmail3″ class=”col-sm-2 control-label”>Author</label>
<div class=”col-sm-10″>
<label class=”radio-inline”>
<input type=”radio” name=”gender” value=”male”> Male
</label>
<label class=”radio-inline”>
<input type=”radio” name=”gender” value=”female”> Female
</label>
</div>
</div>

<div class=”form-group”>
<div class=”col-sm-offset-2 col-sm-10″>
<div class=”checkbox”>
<label>
<input type=”checkbox” value=”yes” name=”agree”> I Agree
</label>
</div>
</div>
</div>
<div class=”form-group”>
<div class=”col-sm-offset-2 col-sm-10″>
<button type=”submit” class=”btn btn-success”>Submit Details</button>
</div>
</div>
</form>
</div>
</div>
@endsection

 

 

 

 

 

 

{{– <!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”utf-8″>
<title>
</title>
<!– SEO Meta Tags–>
<meta name=”description” content=””>
<meta name=”keywords” content=””>
<meta name=”author” content=”Rokaux”>
<!– Mobile Specific Meta Tag–>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no”>
<!– Favicon and Apple Icons–>
<link rel=”stylesheet” media=”screen” href=”{{URL::asset(‘assets/css/vendor.min.css’)}}”>
<link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css” integrity=”sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u” crossorigin=”anonymous”>
<script src=”https://code.jquery.com/ui/1.12.1/jquery-ui.js”></script>
</head>
<body>

@include(‘header’)

@yield(‘content’)

<script src=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js” integrity=”sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa” crossorigin=”anonymous”></script>
</body>
</html> –}}

 

 

 

@extends(‘layout.master’)

@section(‘content’)
<h1>Home Us</h1>

@endsection

 

 

if (auth()->check() && auth()->user()->role_id == 1)
{
return $next($request);
}
return Redirect::back();

===================================================================================================

with([‘getData’=>$data]);
}

public function getStateList(Request $request)
{
/*
Here we are receving data from ajax by $request->input(‘country_id’)
*/
$stateData = State::where(‘country_id’,$request->input(‘country_id’))->get();
echo ‘‘;

foreach($stateData as $row)
{
echo ‘‘;
}
}
else
{

}

}

}

<===========================================================================>
Route
Route::get(‘input’, ‘DropController@Input’);

Route::get(‘get-state-list’,’DropController@getStateList’);
<===========================================================================>

Drop Down

==============================================================================================
Parent Child with 0 value in one table

category != null)
{
$p_id = $request->category;
}
else
{
$p_id = 0;
}

Category::create([
‘name’ => $request->name,
‘parent_id’ => $p_id,
]);

return redirect(‘category’);
}
}

Model

belongsTo(‘App\Category’, ‘parent_id’);
}

public function children()
{
return $this->hasMany(‘App\Category’, ‘parent_id’);
}
}

view

Category

@csrf

{{–

@foreach ($categories as $category)

@foreach ($category->children as $children)

@endforeach

@endforeach

{{ $category->name }}
{{ $children->name }}

–}}

@foreach ($categories as $category)
@if($category->parent_id == 0)

{{ $category->name }}

@foreach ($category->children as $children)

{{ $children->name }}

@endforeach

@endif
@endforeach

=================================================================================================

—————–

Leave a comment

Your email address will not be published. Required fields are marked *

How it works for an SEO

As we are into digital marketing for the past many years and we have worked on many web project to achieve the our goal so that we can provide the quality work for our clients, so we have few steps which we have mention below, so these are the steps on which we work to make our client happy.

Find Keywords

On page Optimization

Off page Optimization

Reach Target

How it works for Web Development

Web Designing and Development is very creative and logical things for this we have creative designer who understands our client requirements, as per that designing and development done by our developer who loves to play with code.


Designing

Development

Testing

Delivery

Why Choose Rank Lift Technologies

Rank Lift Technologies is a global information technology & seo company and well known as SEO Services India, we are very focused and committed to empowering business transformation of our client and we love seo marketing. These are facts that you will choose us as we are best seo company We work on our Client satisfaction which full filled their business goal, as we are very dedicated towards our work respect the punctuality of time delivery the project before deadline, full our commitment so that our client would not get disappointed.



Focus on Result

Strong Technical Team

Client Satisfaction

Trustworthy

No Hidden Cost

Contact us here