1. Go to this page and download the library: Download houdunwang/laravel-view 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/ */
public function _title()
{
return [
'title'=> '栏目名称',//表单标题
'type'=> 'input',//表单类型
'_view'=> 'form.input'//将使用 resources/views/form/input.blade.php 渲染
];
}
namespace App\Http\Controllers;
use App\Category;
use App\Tables\CategoryHandle;
class HomeController extends Controller
{
public function create(Category $Category)
{
$handle = new CategoryHandle($Category);
$html = $handle->render();
return view('home', compact('html'));
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.