I have a piece of code and I\'m trying to find out why one variation works and the other doesn\'t.
return View::make(\'gameworlds.mygame\', compact(\'fixture
Route::get('/', function () {
return view('greeting', ['name' => 'James']);
});
Hello, {{ $name }}
or
public function index($id)
{
$category = Category::find($id);
$topics = $category->getTopicPaginator();
$message = Message::find(1);
// here I would just use "->with([$category, $topics, $message])"
return View::make('category.index')->with(compact('category', 'topics', 'message'));
}