David
David

Reputation: 7525

Laravel 4 - Resource - Trying to return view from subfolder?

I've just started using Laravel 4 and I have a resource called "OrderController" with the following code:

 public function index()
 {
     return View::make('order.index');
 }

In my views folder I have a folder called "order" with a file called "index.blade.php" in it

Can you see anything wrong with this code as when I visit /order (this is mapping to the "OrderContoller") I get the following error:

Error in exception handler: The stream or file "/Users/Dave/Sites/test_website/app/storage/logs/log-apache2handler-2013-06-16.txt" could not be opened: failed to open stream: Permission denied in /Users/Dave/Sites/test_website/bootstrap/compiled.php:7259

routes.php:

Route::get('/', function()
{
    return View::make('index');

});

Route::resource('order', 'OrderController');

Any ideas?

It works using any views directly in the "views" folder, but I get that error if using a subfolder in the views folder.

Thanks, Dave

Upvotes: 1

Views: 4248

Answers (1)

Jacob Raccuia
Jacob Raccuia

Reputation: 1686

Taking the answer from the comments, since it worked for me. If you're getting this type of error:

Error in exception handler: The stream or file "/Users/Dave/Sites/test_website/app/storage/logs/log-apache2handler-2013-06-16.txt" could not be opened: failed to open stream: Permission denied in /Users/Dave/Sites/test_website/bootstrap/compiled.php:7259

CHMOD every file in the storage folder to 777. I did that in FileZilla.

Or go to the app folder in your command line and write:

sudo chmod -R 777 storage

Upvotes: 2

Related Questions