PHP code example of laravel-macros / eloquent-insert-as-model
1. Go to this page and download the library: Download laravel-macros/eloquent-insert-as-model library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
laravel-macros / eloquent-insert-as-model example snippets
php
User::insertAsModel([
[
'options' => ['sms' => true],
'shelf' => collect(['book1', 'book2', 'book3']),
],
[
'options' => ['sms' => false],
'shelf' => collect(['book1', 'book2']),
],
]);