PHP code example of ahmadyousefdev / automs

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

    

ahmadyousefdev / automs example snippets

 bash
php artisan jetstream:install livewire
npm install
npm run dev
php artisan migrate
php artisan vendor:publish --tag=jetstream-views
 bash
php artisan automs:create modelName
 bash
php artisan migrate
 bash
php artisan automs:create article

app/Models/Article.php
app/Http/Controllers/ArticleController.php
database/migrations/timestamp_create_articles_table.php
resources/views/articles/index.blade.php
resources/views/articles/create.blade.php
resources/views/articles/show.blade.php
resources/views/articles/edit.blade.php
 php
use App\Http\Controllers\ArticleController;
Route::group(['prefix' => 'articles', 'middleware' => ['auth']], function () {
    Route::get('/', [ArticleController::class, 'index'])->name('articles.index');
    Route::get('/create', [ArticleController::class, 'create'])->name('articles.create');
    Route::post('/submit',[ArticleController::class, 'store'])->name('articles.store');
    Route::get('/id_{id}', [ArticleController::class, 'show'])->name('articles.show');
    Route::get('/id_{id}/edit',[ArticleController::class, 'edit'])->name('articles.edit');
    Route::put('/id_{id}/update',[ArticleController::class, 'update'])->name('articles.update');
    Route::put('/id_{id}/destroy',[ArticleController::class, 'destroy'])->name('articles.destroy');
});