CrestApps / laravel-code-generator

An efficient Laravel code generator, saving time by automating the creation of resources such as views, controllers, routes, migrations, languages, and form-requests. Highly flexible and customizable, it includes a cross-browser compatible template and client-side validation for application modernization.
https://laravel-code-generator.crestapps.com
MIT License
738 stars 158 forks source link

template bootstrap 4 #61

Closed nicolaszanghi closed 6 years ago

nicolaszanghi commented 6 years ago

Hello,

Did someone created a template for Bootstrap v4 ?

MikeAlhayek commented 6 years ago

I am not aware of anyone that did that. It should be a straight forward process to do.

If you would like to contribute into this package, feel free to fork branch v2.3 (https://github.com/CrestApps/laravel-code-generator/tree/v2.3) and create 2 new templates that support bootstrap 4. Here is the instruction on how to create a custom template (https://www.crestapps.com/laravel-code-generator/docs/2.2#how-to-create-custom-template).

Ybansan commented 6 years ago

Hi, I created a template for Bootstrap 4. I would like to contribute, but I do not have write access to the repository, in order to branch.

MikeAlhayek commented 6 years ago

Ybansab that is great! What issue are you running into while trying to fork the project? Please note tha Instead of foking the project, I would just create a new project in your own GitHub account and maintain the new template there. If for some reason you don’t want to create that project on your own account, I can create a new project for bootstrap4 project and you can commit to the new project. But I think you should own that project on your own account

Ybansan commented 6 years ago

As you want. In fact I am new to GitHub. I will try according to your recommendation.

Ybansan commented 6 years ago

https://github.com/Ybansan/crestapps-bootstrap4-templates It was hard to do for me, a newbie with github, but I learned a lot. Thank you Mike for your advices and your job.

MikeAlhayek commented 6 years ago

Great work! Glad I can help. I suggest you do the following

  1. Make 2 templates, one to support Laravel-collective and another one for the standard code. Name them something like bootstrap4 and collective-bootstrap4. Not all users like to use Laravel-collective to generate code.

  2. Add a service provider in your package so the user can run the php artisan vendor:publish ... command to publish the template instead of having to do that manually. Here is an example of a service provider https://github.com/CrestApps/laravel-code-generator/blob/master/src/CodeGeneratorServiceProvider.php

  3. the composer required your own package + any version of the code generator 2.2.* since this template is for the new v2.3 I suggest you change that to requires v2.3.x-dev

diorz38 commented 6 years ago

i think, is not too difficult to do that, i can manage build some of custom stub file (template) with free Bootstrap 4 admin template (i use extreme Admin Lite from WrapPixel), the problem is, i dont know how to put name of main layout dynamicaly on @extend() line, so i just hard coded it:blush:

I use v2.3.x-dev package

i think its great idea if some people (hope it'll alot) to maintain some custom template, it will enrich the crestApps it self, i'll contribute my self too thanks to Mr. @Ybansan so i can learn form his repos to do that (i'm newbie in laravel :blush:)

here some page example: index.blade.stub.zip

Ybansan commented 6 years ago

Hi Mike,

I put in practice your advices 1 and 2 (https://github.com/Ybansan/crestapps-bootstrap4-templates):

I did not made a v2.3. I prefer to wait and apply changes over templates from a stable version.