PHP code example of finalsmile6868 / laravel-admin-sku

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

    

finalsmile6868 / laravel-admin-sku example snippets


// key为file
if($request->hasFile('file')) {
    $file = $request->file('file');
    $path = $file->store('images');

    // 返回格式
    return ['url'=> Storage::url($path)];
}

$form->sku('sku','商品SKU')->default($json);

// 处理数据
$form->saving(function($form) {
    dd($form->sku);
});