Problem with foreach, laravel is not recognizing the model Indexes [closed]

2

Index Controller:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use View;
use App\Indexes;
use Illuminate\Support\Facades\DB;

class IndexController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public $restful = true;

    public function index()
    {
        return view::make('index')
        ->with('name', 'teste')
        ->with('index', Indexes::all());
    }

Model:

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Indexes extends Model
{
    protected $table = 'index';

    protected $filliable = [
      'name'
    ];
}

Meu Index.blade:

@foreach($indexes as $index)

  <td> {{$index->name}} </td>

  @endforeach
    
asked by anonymous 20.11.2015 / 23:23

0 answers