Support the ongoing development of Laravel.io →
Views Blade
Last updated 1 year ago.
0

This worked for me, I was able to load the partial with a var as the controller@method.

I had to have a route using the controller@method though or it failed


- in Routes.php
Route::get('/show', array('as' => 'home1', 'uses' => 'HomeController@showTest'));

- in HomeController
public function showWelcome()
	{
            $addNewAction = 'HomeController@showTest';
            return \View::make('hello')->with( 'addNewAction' , $addNewAction );
	}

using a your partial code passing the 'HomeController@showTest' and it worked.

Though it might be better to look at the url helper , to generate a route link in the template - http://laravel.com/docs/4.2/helpers#urls

Hope that helps

Last updated 1 year ago.
0

Thanks for the response.

A composer update has fixed it.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Blackpig blackpig Joined 6 May 2014

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.