PHP code example of akat03 / scaffoldplus
1. Go to this page and download the library: Download akat03/scaffoldplus 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/ */
akat03 / scaffoldplus example snippets
use App\Http\Controllers\PostController;
Route::get("posts/dl_delete_submit", [PostController::class,'dl_delete_submit'])->name("posts.dl_delete_submit"); // multiple delete
Route::post("posts/sort_exec_ajax", [PostController::class,'sort_exec_ajax'])->name("posts.sort_exec_ajax"); // sort exec
Route::get("posts/sort", [PostController::class,'sort'])->name("posts.sort"); // sort view
Route::delete("posts/destroy_ajax", [PostController::class,'destroy_ajax'])->name("posts.destroy_ajax"); // ajax delete
Route::get("posts/index_ajax", [PostController::class,'index_ajax'])->name("posts.index_ajax"); // ajax index
Route::get("posts/search", [PostController::class,'search'])->name("posts.search");
Route::resource("posts", PostController::class);
sh
php artisan cache:clear; php artisan config:clear; php artisan route:clear; php artisan view:clear; composer dump-autoload
sh
php artisan
sh
php artisan scaffoldplus:publish
sh
php artisan migrate
yml
sort_no:
name: sort_no
view_list_title: 'sort number'
comment: 'sort number'
default: null
view_list_flag: 1
view_show_flag: 1
view_add_flag: 1
view_edit_flag: 1
view_delete_flag: 1
editable_flag: 1
input_type: text
input_css_style: "width:60px;"
view_add_param_php: $p = \App\Post::orderBy('sort_no','DESC')->first(); if($p){return $p->sort_no+1;}else{return 1;}
sh
php artisan storage:link