PHP Developers Network
http://forums.devnetwork.net/

Method src does not exist error in laravel
http://forums.devnetwork.net/viewtopic.php?f=72&t=141835
Page 1 of 1

Author:  gautamz07 [ Tue Sep 29, 2015 3:20 pm ]
Post subject:  Method src does not exist error in laravel

I was just trying to create a link in laravel like so:

Syntax: [ Download ] [ Hide ]
 <li><a href="products/productspg">products</a></li>
 


I have a products controller with the following method in it:

Syntax: [ Download ] [ Hide ]
public function getProductpg() {
    return View::make('store.products')
        ->with('products' , Product::take(4)->orderBy('created_at' , 'DESC')->get());
}
 


Also i have a products view under the store folder, i.e. products.blade.php,

now when i click on the link on the index page on I.E. the below link:

Syntax: [ Download ] [ Hide ]
<li><a href="products/productspg">products</a></li>
 


I expect the below view to open:

products.blade.php , instead i get the following error :

[url]
http://i.imgur.com/Dukx61B.jpg
[/url]

Now why am i getting this error , when i try to load even the index page of my app, this is not working , Why ?

Author:  Celauran [ Tue Sep 29, 2015 4:12 pm ]
Post subject:  Re: Method src does not exist error in laravel

You're calling a method that doesn't exist. With no code posted, I can't say where. I did mention yesterday that Illuminate\HtmlBuilder::src doesn't exist.

Author:  gautamz07 [ Wed Sep 30, 2015 12:20 am ]
Post subject:  Re: Method src does not exist error in laravel

I did have the following line in my main.blade.php file:

{{ HTML::src('http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'); }}

But i took it off and i still get the same error .

Author:  gautamz07 [ Wed Sep 30, 2015 12:27 am ]
Post subject:  Re: Method src does not exist error in laravel

I tryed the clear cache command ,

http://stackoverflow.com/questions/1890 ... -laravel-4

still getting the same error .

Author:  Celauran [ Wed Sep 30, 2015 6:23 am ]
Post subject:  Re: Method src does not exist error in laravel


Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/