Class Book was not found. I have read the documentation that everything should work with namespaces , i have tried many different combinations but nothing works. help pls.
this is my code from routes.php
Route::get('/', function ()
{
$book= new Book;
$book->write='Mark Twain';
$book->title='the adventures of ton saywer';
$book->description='A nover about a young boy';
$book->published=date('y-m-d');
$book->save();
return $book->id;
return View::make('hello');
});
and this is my code from Book.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Book extends Model
{
//
}