laravel collection to array with/without keys

Collections to array on laravel is a easy to solve problem. An Laravel array to collection convert on Controller is a few ways. You can use toArray() of eloquent as below.  laravel collection to array without keys The toArray method converts the collection into a plain PHP array. If the collection’s values are Eloquent models, the models will also… Continue reading laravel collection to array with/without keys

add a new column to existing table in a migration

To create a migration, you may use the migrate:make command on the Artisan CLI. Use a specific name to avoid clashing with existing models. You then need to use the Schema::table() method (as you’re accessing an existing table, not creating a new one). And you can add a column like this: and don’t forget to add the… Continue reading add a new column to existing table in a migration

localbase v. 2.0

localbase is build with Laravel for B2B and also for B2C to sharing the newest status of orders with your business partners. The first version come on April ’19 and started the beta version on the German markt. The new version 2.0 is coming with a lot of API Control Pages for online voice and… Continue reading localbase v. 2.0

Laravel handle incoming emails in your application

Catch incoming emails in your Laravel application via laravel-mailbox package for Laravel 5.7 and up that will allow your application to catch and react to incoming emails from different services like Mailgun, SendGrid or the local log driver for debugging purposes. to listen incoming email messages in a Laravel-Route like fashion and react to them.… Continue reading Laravel handle incoming emails in your application

Laravel create model, controller and migration in single artisan command

For Laravel 5.6 and older: -m, –migration Create a new migration file for the model.-c, –controller Create a new controller for the model.-r, –resource Indicates if the generated controller should be a resource controller and for Laravel 5.7 and newer: -a, –all Generate a migration, factory, and resource controller for the model or you can… Continue reading Laravel create model, controller and migration in single artisan command