You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
8.6 KiB

<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Laravel Simple CRUD Generator on Simple CRUD Generator for Laravel</title><link>https://nafiesl.github.io/SimpleCrudGenerator/</link><description>Recent content in Laravel Simple CRUD Generator on Simple CRUD Generator for Laravel</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Copyright &amp;copy; 2017 Nafies Luthfi.</copyright><lastBuildDate>Tue, 19 Jan 2021 19:41:00 +0800</lastBuildDate><atom:link href="https://nafiesl.github.io/SimpleCrudGenerator/index.xml" rel="self" type="application/rss+xml"/><item><title>About this package</title><link>https://nafiesl.github.io/SimpleCrudGenerator/docs/about/</link><pubDate>Sat, 30 Jan 2021 21:00:00 +0800</pubDate><guid>https://nafiesl.github.io/SimpleCrudGenerator/docs/about/</guid><description>About this package This package contains artisan make:crud commands to create a simple CRUD feature with test classes on our Laravel 5.5 (and later) application. This package is fairly simple, to boost test-driven development method on our laravel application.
With this package installed on local environment, we can use (e.g.) php artisan make:crud Vehicle command to generate some files :
App\Models\Vehicle.php eloquent model xxx_create_vehicles_table.php migration file VehicleController.php index.blade.php and forms.</description></item><item><title>How to install</title><link>https://nafiesl.github.io/SimpleCrudGenerator/docs/how-to-install/</link><pubDate>Sat, 30 Jan 2021 21:00:00 +0800</pubDate><guid>https://nafiesl.github.io/SimpleCrudGenerator/docs/how-to-install/</guid><description>How to install For Laravel 8.x 1 2 # Get the package $ composer require luthfi/simple-crud-generator:^2.0 For Laravel 5.6 to 7.x 1 2 # Get the package $ composer require luthfi/simple-crud-generator:^1.0 For Laravel 5.5 To use this package on laravel 5.5, we need to add the package (with browserkit) within require-dev in composer.json file, like so :
1 2 3 4 5 # Install required package for laravel/browser-kit-testing $ composer require symfony/css-selector:^3.</description></item><item><title>How to use</title><link>https://nafiesl.github.io/SimpleCrudGenerator/docs/how-to-use/</link><pubDate>Sat, 30 Jan 2021 21:00:00 +0800</pubDate><guid>https://nafiesl.github.io/SimpleCrudGenerator/docs/how-to-use/</guid><description>How to use Just type in terminal $ php artisan make:crud ModelName command, it will create simple Laravel CRUD files of given model name completed with tests.
For example we want to create CRUD for &amp;lsquo;App\Models\Vehicle&amp;rsquo; model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 $ php artisan make:crud-simple Vehicle Vehicle resource route generated on routes/web.php. Vehicle model generated. Vehicle table migration generated.</description></item><item><title>Available Commands</title><link>https://nafiesl.github.io/SimpleCrudGenerator/docs/available-commands/</link><pubDate>Sat, 30 Jan 2021 21:00:00 +0800</pubDate><guid>https://nafiesl.github.io/SimpleCrudGenerator/docs/available-commands/</guid><description>Available Commands Bootstrap 4 Views Full CRUD feature with tests 1 $ php artisan make:crud ModelName Simple CRUD feature with tests 1 $ php artisan make:crud-simple ModelName Bootstrap 3 views Full CRUD feature with tests 1 $ php artisan make:crud ModelName --bs3 Simple CRUD feature with tests 1 $ php artisan make:crud-simple ModelName --bs3 API CRUD feature with tests 1 $ php artisan make:crud-api ModelName</description></item><item><title>Model Attribute/Column</title><link>https://nafiesl.github.io/SimpleCrudGenerator/docs/model-attributes/</link><pubDate>Sat, 30 Jan 2021 21:00:00 +0800</pubDate><guid>https://nafiesl.github.io/SimpleCrudGenerator/docs/model-attributes/</guid><description>Model Attribute/Column The Model and table will only have 2 pre-definded attributes or columns : title and description on each generated model and database table. You can continue working on other column on the table.</description></item><item><title>Views</title><link>https://nafiesl.github.io/SimpleCrudGenerator/docs/views/</link><pubDate>Sat, 30 Jan 2021 21:00:00 +0800</pubDate><guid>https://nafiesl.github.io/SimpleCrudGenerator/docs/views/</guid><description>Views Bootstrap 4 Views The generated view files use Bootstrap 4 by default (for Laravel 5.6 and later).
Bootstrap 3 Views We can also generates views that use Bootstrap 3 with --bs3 command option, eg for Laravel version 5.5.
The Default Layout View You need a resources/views/layouts/app.blade.php view file, simply create one with php artisan make:auth command. You can change this configuration via the config/simple-crud.php file.</description></item><item><title>For API</title><link>https://nafiesl.github.io/SimpleCrudGenerator/docs/for-api/</link><pubDate>Sat, 30 Jan 2021 21:00:00 +0800</pubDate><guid>https://nafiesl.github.io/SimpleCrudGenerator/docs/for-api/</guid><description>For API If we want to generate API Controller with feature tests, we use following command :
1 $ php artisan make:crud-api Vehicle By default, we use Laravel Token Based Authentication, so we need to update our user model.
Add api_token column on our users_table_migration. Add api_token as fillable property on User model. Add api_token field on our UserFactory. API Usage The generated API is a REST API, using GET and POST verbs, with a URI of /api/modelname.</description></item><item><title>Config File</title><link>https://nafiesl.github.io/SimpleCrudGenerator/docs/config-file/</link><pubDate>Sat, 30 Jan 2021 21:00:00 +0800</pubDate><guid>https://nafiesl.github.io/SimpleCrudGenerator/docs/config-file/</guid><description>Config File You can configure your own by publishing the config file:
1 $ php artisan vendor:publish --provider=&amp;#34;Luthfi\CrudGenerator\ServiceProvider&amp;#34; --tag=config That will generate config/simple-crud.php file.
By default, this package have some configuration:
1 2 3 4 5 6 7 8 9 10 11 12 &amp;lt;?php return [ // The master view layout that generated views will extends &amp;#39;default_layout_view&amp;#39; =&amp;gt; &amp;#39;layouts.app&amp;#39;, // The base test case class path for generated testing classes &amp;#39;base_test_path&amp;#39; =&amp;gt; &amp;#39;tests/BrowserKitTest.</description></item><item><title>Publishing the stub files</title><link>https://nafiesl.github.io/SimpleCrudGenerator/docs/publishing-the-stub-files/</link><pubDate>Sat, 30 Jan 2021 21:00:00 +0800</pubDate><guid>https://nafiesl.github.io/SimpleCrudGenerator/docs/publishing-the-stub-files/</guid><description>Publishing the stub files Stub files is the templates which we use to generate the code for each model classes and files. We can customize the stub files as we needed by publishing them to our project directory.
1 $ php artisan vendor:publish --provider=&amp;#34;Luthfi\CrudGenerator\ServiceProvider&amp;#34; --tag=stubs That will generate stub files on stubs/simple-crud directory. Now we can change some stub files based on our project needs.</description></item><item><title>Screenshots</title><link>https://nafiesl.github.io/SimpleCrudGenerator/docs/screenshots/</link><pubDate>Sat, 30 Jan 2021 21:00:00 +0800</pubDate><guid>https://nafiesl.github.io/SimpleCrudGenerator/docs/screenshots/</guid><description>Screenshots Visit your application in new resource route : http://127.0.0.1:8000/vehicles</description></item><item><title>Generated Testing Suite</title><link>https://nafiesl.github.io/SimpleCrudGenerator/docs/generated-testing-suite/</link><pubDate>Sat, 30 Jan 2021 21:00:00 +0800</pubDate><guid>https://nafiesl.github.io/SimpleCrudGenerator/docs/generated-testing-suite/</guid><description>Generated Testing Suite Next, let us try the generated testing suite. To use the generated testing classes, we can set the database environment using in-memory database SQLite. Open phpunit.xml. Add two lines below on the env :
1 2 3 4 5 6 7 8 &amp;lt;phpunit&amp;gt; &amp;lt;!-- ..... --&amp;gt; &amp;lt;php&amp;gt; &amp;lt;!-- ..... --&amp;gt; &amp;lt;server name=&amp;#34;DB_CONNECTION&amp;#34; value=&amp;#34;sqlite&amp;#34;/&amp;gt; &amp;lt;server name=&amp;#34;DB_DATABASE&amp;#34; value=&amp;#34;:memory:&amp;#34;/&amp;gt; &amp;lt;/php&amp;gt; &amp;lt;/phpunit&amp;gt; Then run PHPUnit
1 $ vendor/bin/phpunit All tests should be passed.</description></item><item><title>License</title><link>https://nafiesl.github.io/SimpleCrudGenerator/docs/license/</link><pubDate>Sat, 30 Jan 2021 21:00:00 +0800</pubDate><guid>https://nafiesl.github.io/SimpleCrudGenerator/docs/license/</guid><description>License This package is open-sourced software licensed under the MIT license.</description></item></channel></rss>