PHP code example of lexxyungcarter / laravel-modules

1. Go to this page and download the library: Download lexxyungcarter/laravel-modules 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/ */

    

lexxyungcarter / laravel-modules example snippets





namespace $NAMESPACE$; // namespace will be autofilled

use Illuminate\Database\Eloquent\Model;

class Person extends Model
{
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = $FILLABLE$; // fillable properties will be inserted here if specified

    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = "hr_persons"; // auto-generates this in model

    //

}

// 2018_03_25_210616_create_hr_persons_table.php



use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateHrPersonsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('hr_persons', function (Blueprint $table) {
            $table->increments('id');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('hr_persons');
    }
}

 bash
php artisan vendor:publish --provider="Nwidart\Modules\LaravelModulesServiceProvider"
 bash
php artisan vendor:publish --provider="Nwidart\Modules\LaravelModulesServiceProvider"