I am currently trying to clone an existing project of mine from github. After clone I run composer install during the process I receive the following error: Uncaught ReflectionException: Class log does not exist I am running Laravel 5.2 on Centos 7. I have seen references to: Removing spaces within the .env file. Removing the vendor directory & re-installing Removing
Tag: laravel
SQL BETWEEN Two Columns in Laravel/Lumen
Below is an excerpt from the Laravel documentation: The whereBetween method verifies that a column’s value is between two values: $users = DB::table(‘users’)->whereBetween(‘votes’, [1, 100])->…
Create an artisan command for generating custom classes or files
What’s the best way ( or maybe the way it’s actually done ) of creating an artisan command for generating custom classes or files? Like php artisan make:console itself that creates a php class for our …
How can I sanitize laravel Request inputs?
I have MyRequest.php class extending AppHttpRequestsRequest. I want to trim() every input before validation because an e-mail with a space after it does not pass validation. However sanitize() was …
Laravel 5 console (artisan) command unit tests
I am migrating my Laravel 4.2 app to 5.1 (starting with 5.0) and am a lot of trouble with my console command unit tests. I have artisan commands for which I need to test the produced console output, …
How implement ‘remember me’ in laravel 5.1?
How to implement rememeber me functionality in laravel 5.1? Can anyone give me an example? Answer Laravel authentication offers remember me functionality out of the box. In order to use it you need to do 2 things: add remember_token column in your users table – this is where the token will be stored pass true as a second parameter of
Difference between EloquentModel::get() and all()
What is the difference between uses User::all() and User::get() on Eloquent? On Laravel API it describes only all() on EloquentModel.Maybe get() is described on EloquentBuilder. Answer User::all() and User::get() will do the exact same thing. all() is a static method on the EloquentModel. All it does is create a new query object and call get() on it. With all(), you
Laravel : App::setLocale doesn’t work
I’m using laravel 5.1, I’m trying to update locale in app file like this : In Locale Middleware file : … public function handle($request, Closure $next) { if(Session::has(‘locale’…
Change Faker Locale in Laravel 5.2
Is there a way to specify the Faker locale in the database/factories/ModelFactory.php file ? Here is my non functioning attempt at doing so >,< Thanks for reading! Answer Faker locale can be configured in the config/app.php configuration file. Just add the key faker_locale. e.g.: ‘faker_locale’ => ‘fr_FR’, See also my PR to document that previously undocumented feature: https://github.com/laravel/laravel/pull/4161
Indirect Modification of Overloaded Property Laravel MongoDB
I am using MongoDB with Laravel. I have a collection called categories which has one document I am trying to make a function that add specifics to the specifics array in the above document. Here is how my request body is And i am handling this request with the following function But when i hit this call, I get error