Support the ongoing development of Laravel.io →
Installation Configuration Blade
Last updated 2 years ago.
0

Could you show your route to this and the Task model?
Meanwhile try this, change index from

public function index()
    {
        // fetch all tasks
        $tasks = Task::all();

        // load a view to display them
        return view('tasks.index', compact('tasks'));

    }

to

public function index()
    {
       echo "made it here route must be working";
      // fetch all tasks
       // $tasks = Task::all();

        // load a view to display them
       // return view('tasks.index', compact('tasks'));

    }

If that works change:

return view('tasks.index', compact('tasks'));

to

return view('tasks.index');

And at the top of view echo something. Then at least you will know if anything is passing from route through controller to view.
Then more troubleshooting if that works.

Last updated 9 years ago.
0

Sure thing Jim. Thanks for your reply.

<?php namespace App;

use Illuminate\Database\Eloquent\Model as Eloquent;

class Task extends Eloquent
{

} 
<?php

Route::get('/', 'WelcomeController@index');

Route::get('tasks', 'TasksController@index');

0

I edited my reply please re-read

0

Make your model like this:

<?php namespace App;

use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;

class Powner extends Model implements AuthenticatableContract, CanResetPasswordContract {

	use Authenticatable, CanResetPassword;
    protected $table = 'powners';
    protected $primaryKey = 'ownerid';
    protected $fillable = [
        'ownerid',
        'oname',
        'ostreet',
        'odate',
        'ocheck'
   ];
        public $timestamps = [];
}   

Of course with your fields, and If model is Task, table should be tasks.
This is for laravel 5, 4 is different.

Last updated 9 years ago.
0

It passes perfectly from route to controller to view. I can use dd($variable) in the view so it's not as if all helper functions are missing. I also set up a second app and I have the same problem there, albeit on the same virtual machine.

I expanded the model as you suggested but no luck.

Thanks again for your advice.

0

JosephBloggs - did you ever figure this out? I am getting the same thing. I think that the other replies didn't understand that it's far past the model and the controller that it's simply the blade file erroring out on the "link_to()"" function. Everything else is working. I am getting the exact same thing.

Any help you can offer would be great. I am running into a lot of these issues because Laravel 5 seems pretty radically different than 4 but the tutorials aren't up to speed yet.

0

The illuminate/html package has been removed from Laravel 5 and is no longer maintained -- kind of old story now.

To get these helpers work you will need this package:

http://laravelcollective.com/docs/5.0/html#installation

http://laravelcollective.com/docs/5.0/html#generating-urls

Hope this will help you guys.

Usman.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.