<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use laravel;
use App\Http\Controllers;
class test extends Controller {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
return view("welcome");
}
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public function store(Request $request)
{
$user = new laravel;
$user->name = Input::get("name");
$user->email = Input::get("email");
$user->password = Input::get("password");
$user->mobile = Input::get("mobile");
$user->save();
}
/**
* Display the specified resource.
*
* @param int $id
* @return Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param int $id
* @return Response
*/
public function update($id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
//
}
}
I m getting this error in my view page FatalErrorException in test.php line 35: Class 'laravel' not found
My 35 line code is $user = new laravel;
how to solve this type of error?
i have also added this code in the page App\laravel; then also error is coming in the code
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire