PHP code example of luis-developer-08 / yui

1. Go to this page and download the library: Download luis-developer-08/yui 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/ */

    

luis-developer-08 / yui example snippets




namespace App\Http\Controllers\Orion;

use Orion\Http\Controllers\Controller;
use App\Models\Post;

class PostController extends Controller
{
    protected $model = Post::class;
}



namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Post extends Model
{
    use HasFactory;

    protected $guarded = [];
}

Orion::resource('posts', \App\Http\Controllers\Orion\PostController::class);
bash
php artisan migrate --seed
bash
php artisan make:inertia Components/MyComponent
bash
php artisan make:orion PostController

app/Http/Controllers/Orion/PostController.php
app/Models/Post.php