I am new to laravel and I got exception descripted in title. I know that I need to "use App\Model_Name;". Please Help! This is Model Class
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Product extends Model {
}
This is Controller class
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request; use App\Product;
class ProductsController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return Post::all(); return view('products.index'); }
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2vurdmf
via IFTTT
Aucun commentaire:
Enregistrer un commentaire