ivanmijatovic89 / proto-view-generator
Installs: 106
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
pkg:composer/ivanmijatovic89/proto-view-generator
Requires
- php: >=5.4.0
- illuminate/support: 5.0.*
This package is not auto-updated.
Last update: 2025-10-25 23:21:24 UTC
README
add to composer.json
"require-dev": {
      "dam1r89/proto-generator": "dev-master",
      "ivanmijatovic89/proto-view-generator": "dev-master"
},
add to app/config/app.php
	'providers' => [
	    ...
	    'ivanmijatovic89\ProtoViewGenerator\ProtoViewGeneratorServiceProvider',
        'dam1r89\ProtoGenerator\ProtoGeneratorServiceProvider',
        'Illuminate\Html\HtmlServiceProvider',
    ]
    'aliases' =>
    [
        ...
        'Form' => 'Illuminate\Html\FormFacade',
        'HTML' => 'Illuminate\Html\HtmlFacade',
    ]
Go to domain.com/protomaker
For Modules install
https://github.com/caffeinated/modules
"require": {
    "caffeinated/modules": "~1.0"
   }
Service Provider
'providers' => [
        'Caffeinated\Modules\ModulesServiceProvider'
        ]
Facade
'aliases' =>
    [
        'Module' => 'Caffeinated\Modules\Facades\Module'
    ]
publish config file - look at docs
Translations
Instal Laravel-Translatable
https://github.com/dimsav/laravel-translatable
Step 1: Install translation package
Add the package in your composer.json by executing the command.
composer require dimsav/laravel-translatable
Next, add the service provider to app/config/app.php
'Dimsav\Translatable\TranslatableServiceProvider',
Step 2: Publish Translation Config
php artisan vendor:publish
//or
php artisan vendor:publish --provider="Dimsav\Translatable\TranslatableServiceProvider"
Examples with command line
Than to make module type:
php artisan module:make vendor
than create crud
php artisan proto vendor --fields='{"name":{"type":"text"},"user_id":{"type":"integer","relation":{"class":"\\App\\User","field":"email","name":"user","type":"hasOne"}}}' --data='{"namespace":"App\\Modules\\Vendor\\"}'  --output="App/Modules/Vendor"  --output="App/Modules/Vendor" --template="modul" -r
than migrate vendor module
php artisan module:migrate vendor
###Example for Posts
php artisan module:make post
//old without namespace - delete latter
//php artisan proto post --fields='{"name":{"type":"text","validation":"required|max:25|min:8"}, "body":{"type":"text"},"user_id":{"type":"integer","relation":{"class":"\\App\\User","field":"email","name":"user","type":"hasOne"}},"vendors":{"type":"integer","relation":{"class":"\\App\\Modules\\Vendor\\Models\\Vendor","field":"name","name":"vendors","type":"belongsToMany"}}}' --output="App/Modules/Post" --template="modul" -r
php artisan proto post --fields='{"name":{"type":"text","validation":"required|max:25|min:8"}, "body":{"type":"text"},"user_id":{"type":"integer","relation":{"class":"\\App\\User","field":"email","name":"user","type":"hasOne"}},"vendors":{"type":"integer","relation":{"class":"\\App\\Modules\\Vendor\\Models\\Vendor","field":"name","name":"vendors","type":"belongsToMany"}}}' --data='{"namespace":"App\\Modules\\Post\\"}'  --output="App/Modules/Post" --template="modul" -r
php artisan module:migrate post
Navigate to to domain/vendors