blog-contest-may-mayhem icon indicating copy to clipboard operation
blog-contest-may-mayhem copied to clipboard

Laravel CRUD generator from scratch

Open devlob opened this issue 7 years ago • 8 comments
trafficstars

https://medium.com/@devlob/laravel-crud-generators-614caddf8bea

devlob avatar May 23 '18 20:05 devlob

不错的文章

hellowords avatar May 24 '18 01:05 hellowords

Thank you @hellowords :+1: :)

devlob avatar May 24 '18 09:05 devlob

I think that I will work on this and make it a full-rich library. Something similar to what Visual Studio offers :/

devlob avatar May 24 '18 15:05 devlob

Exactly what I wanted. Thanks!

JunaidQadirB avatar May 25 '18 09:05 JunaidQadirB

@JeyKeu would you like this as a full package?

Some features will include:

  • Basic architecture setup, which is the usual way of using Eloquent directly inside your controllers
  • Laravel agnostic setup, a more advanced architecture where interfaces are used in order to have your controllers dry and you can easily move them to a new project, etc.
  • API controller - Base controller (that includes views)
  • Create relationships according to the fields you pass
  • All the stubs will be editable, which means that you can change them to your likes in case you don't like something.

etc.

devlob avatar May 25 '18 11:05 devlob

@devlob a package would be great. something that's unobtrusive.

JunaidQadirB avatar May 25 '18 19:05 JunaidQadirB

Got it :)

devlob avatar May 26 '18 09:05 devlob

I have try it, but I have faced error. Symfony\Component\Debug\Exception\FatalThrowableError : Class 'App\Console\Commands\File' not found

at /var/www/html/Contest/app/Console/Commands/CrudGenerator.php:92 88| $this->controller($name); 89| $this->model($name); 90| $this->request($name); 91|

92| File::append(base_path('routes/api.php'), 'Route::resource('' . str_plural(strtolower($name)) . "', '{$name}Controller');"); 93| } 94| } 95|

mdhafiz avatar Jun 03 '18 09:06 mdhafiz