PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Sep 19, 2019 12:37 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Sep 29, 2015 3:20 pm 
Offline
Forum Contributor
User avatar

Joined: Wed May 14, 2014 12:18 pm
Posts: 331
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 ?


Top
 Profile  
 
PostPosted: Tue Sep 29, 2015 4:12 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
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.

_________________


Top
 Profile  
 
PostPosted: Wed Sep 30, 2015 12:20 am 
Offline
Forum Contributor
User avatar

Joined: Wed May 14, 2014 12:18 pm
Posts: 331
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 .


Top
 Profile  
 
PostPosted: Wed Sep 30, 2015 12:27 am 
Offline
Forum Contributor
User avatar

Joined: Wed May 14, 2014 12:18 pm
Posts: 331
I tryed the clear cache command ,

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

still getting the same error .


Top
 Profile  
 
PostPosted: Wed Sep 30, 2015 6:23 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada

_________________


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group