How to delete all the rows in a table using Eloquent?
My guess was to use the following syntax: MyModel::all()->delete(); But that did not work. I’m sure it’s super simple, but I’ve searched for … Read more
My guess was to use the following syntax: MyModel::all()->delete(); But that did not work. I’m sure it’s super simple, but I’ve searched for … Read more
I just can’t solve this one. I’m on Linode 1G RAM basic plan. Trying to install a package via Composer and it’s not … Read more
I am pretty new to Laravel 4 and Composer. While I do Laravel 4 tutorials, I couldn’t understand the difference between those two … Read more
I’m having trouble to write query in laravel eloquent ORM. my query is SELECT book_name,dt_of_pub,pub_lang,no_page,book_price FROM book_mast WHERE book_price NOT IN (100,200); Now … Read more
I am trying to redirect to the previous page with a message when there is a fatal error. App::fatal(function($exception) { return Redirect::back()->with(‘msg’, ‘The … Read more
This seems like a pretty basic flow, and Laravel has so many nice solutions for basic things, I feel like I’m missing something. … Read more
I would like to make a timestamp column with a default value of CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP using the Laravel Schema Builder/Migrations. I … Read more
I’m trying to create foreign keys in Laravel however when I migrate my table using artisan i am thrown the following error: [Illuminate\Database\QueryException] … Read more
This question already has answers here: Laravel Eloquent: Ordering results of all() (12 answers) Closed 6 years ago. Simple question – how do … Read more
I’m stuck on a simple task. I just need to order results coming from this call $results = Project::all(); Where Project is a … Read more