PHP code example of codedungeon / laravel-craftsman
1. Go to this page and download the library: Download codedungeon/laravel-craftsman library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
codedungeon / laravel-craftsman example snippets
...
Schema::create('comments', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('post_id');
...
$table->foreign('post_id')->references('id')->on('posts');
});
...
public function rules()
{
return [
"title" => "
'templates' => [
'class' => 'user_templates/class.mustache',
'api-controller' => 'user_templates/api-controller.mustache',
'binding-controller' => 'user_templates/binding-controller.mustache',
'empty-controller' => 'user_templates/empty-controller.mustache',
'command' => 'user_templates/command.mustache',
'controller' => 'user_templates/controller.mustache',
'events' => 'user_templates/event.mustache',
'factory' => 'user_templates/factory.mustache',
'listener' => 'user_templates/listener.mustache',
'migration' => 'user_templates/migration.mustache',
'model' => 'user_templates/model.mustache',
'request' => 'user_templates/request.mustache',
'rule' => 'user_templates/rule.mustache',
'seed' => 'user_templates/seed.mustache',
'test' => 'user_templates/tested.mustache',
'view-create' => 'user_templates/view-create.mustache',
'view-edit' => 'user_templates/view-edit.mustache',
'view-index' => 'user_templates/view-index.mustache',
'view-show' => 'user_templates/view-show.mustache',
],
bash
> composer global