PHPUnit: “Class ‘Eloquent’ not found” when using @dataProvider

I’m running into an issue when writing unit tests with PHPUnit using @dataProvider in a Laravel app. The error I’m receiving is: PHP Fatal error: Class ‘Eloquent’ not found in /path/to/project/app/…

Laravel 5 not finding css files

I’ve just installed a Laravel 5 project on MAMP and my pages are not finding the css files. This is the link to my css in my app.blade.php file: …

Blade: escaping text and allowing new lines

I have a user-input text displayed on one of the pages. I want to allow new lines, though. How do I display the text, so it is escaped AND allows new lines? I used nl2br() and Blade’s tripple …

PHP/Laravel – find and read ‘key-value pair’ from file

I want to store some text informations but I don’t want to use database for this. For example there is a file: key1: some text information 1 key2: some text information 2 key3: another text …

Laravel seeder gives error. Class not found

I’m a newbie in Laravel and and I’m teaching myself how to authenticate from a login table. I have migrated and created the table. Now, I’m trying to seed the data into the login table, but the …

A ViewModel for a Contact Form in Laravel

I am not new to MVC, but I am just getting started with Laravel. In ASP.NET MVC we have ViewModels which is basically a data object that we can pass to the view. The view can then use the ViewModel in …

Laravel Ajax Call to a function in controller

I am new to laravel and I want to make an ajax call to a function written in controller. I have done the following but not working. In View : $.ajax({ type: “POST”, url: ‘OrderData’, // Not …

Laravel – Multiple User Logins Under One Main User Account

My application has the structure of monthly subscriptions that give you a single “admin” account login responsible for billing. Under that main user account, there can be numerous employees, some, …

Defined route throwing controller method not found laravel 4

I have a route defined in routes.php file but when i make an ajax request from my angular app, i get this error {“error”:{“type”:”Symfony\Component\HttpKernel\Exception\NotFoundHttpException”,”…

Recurring permissions problems w/ Laravel on vagrant box

I’m getting some strange permissions problems. I’m using Laravel on a vagrant box. I regularly have to reset my app/storage permissions. Here’s my process: in terminal, run sudo chmod -R 777 app/…