Laravel Controller doesn’t exist, even though it clearly exists

The error I’m getting is that the controller doesn’t exist even though I know it does, here’s the code. Route.php Route::get(‘mdpay/template’, array(“uses” => “templateController@index”)); …

How to debug Laravel framework?

I’m a newbie PHP programmer now casting an eye at frameworks, and among them Laravel sounds appealing to me as a beginner (somehow unfortunately because I’ve already invested in literature on Zend 2). …

Laravel blade – Add a class if a condition is met

This is simple but I can’t seem to be able to do it with blade and I usually go back to php for this but, since I can’t declare a new php variable with blade (without printing it, that is) how should …

Mockery no matching handler for closure

I can’t figure out why I’m getting this error during this test. My test appears to be matching the rest of the code exactly. What am I overlooking? In my test I have: $passwordBroker = m::mock(…

Doing HTTP requests FROM Laravel to an external API

What I want is get an object from an API with a HTTP (eg, jQuery’s AJAX) request to an external api. How do I start? I did research on Mr Google but I can’t find anything helping. Im starting to …

Laravel Facades – Passing parameter to __construct()

If I am creating a Facade, and I want to pass parameters before it becomes instantiated, what do I do?

Laravel pagination pretty URL

Is there a way to get a pagination pretty URL in Laravel 4? For example, by default: http://example.com/something/?page=3 And what I would like to get: http://example.com/something/page/3 Also, …

Laravel: Get Object From Collection By Attribute

In Laravel, if I perform a query: $foods = Food::where(…)->get(); …then $foods is an Illuminate Collection of Food model objects. (Essentially an array of models.) However, the keys of this …

Laravel Eloquent inner join with multiple conditions

I have a question about inner joins with multiple on values. I did build my code like this in laravel. public function scopeShops($query) { return $query->join(‘kg_shops’, function($join) {…

Laravel – Check if @yield empty or not

Is it possible to check into a blade view if @yield have content or not? I am trying to assign the page titles in the views: @section(“title”, “hi world”) So I would like to check in the main …