mvdnbrk / warehouse-framework

Laravel Warehouse Framework
MIT License
69 stars 17 forks source link

Create Locations From Controller vs php artisan warehouse:make:location #55

Closed pointclickreality closed 4 years ago

pointclickreality commented 4 years ago

Hi, is there a way to create locations within the controller instead of the artisan command?

Something like

$location = Location::create([ 'gln' => 'New Location' 'name' => 'My New Stock Location' ]);

something like this would help a ton, because I have an old system with over 1000 locations that i want to transfer those location names over to your system. I hope this makes since.

mvdnbrk commented 4 years ago

Location is just an Eloquent model. So you could certainly do that with the code you provided yourself.