bantenprov / profil-pengguna
用于创建banten单登录用户配置文件的存储库
dev-master
2018-01-02 11:32 UTC
Requires
- php: >=5.6.4
- illuminate/support: 5.4.*
- laravelcollective/html: ^5.4.0
This package is not auto-updated.
Last update: 2024-09-19 04:55:00 UTC
README
西爪哇省政府应用用户配置文件
安装
安装kanekes
$ composer create-project bantenprov/kanekes project_name "v0.3.0"`
安装包
$ composer require bantenprov/profil-pengguna:dev-master`
需要
kanekes v0.3.0
编辑配置
编辑 config/app.php
'providers' => [ Illuminate\Redis\RedisServiceProvider::class, Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, Illuminate\Session\SessionServiceProvider::class, Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, //.... Collective\Html\HtmlServiceProvider::class, Bantenprov\ProfilPengguna\ProfilPenggunaServiceProvider::class,
'aliases' => [ 'Schema' => Illuminate\Support\Facades\Schema::class, 'Session' => Illuminate\Support\Facades\Session::class, 'Storage' => Illuminate\Support\Facades\Storage::class, 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, //... 'Form' => Collective\Html\FormFacade::class, 'Html' => Collective\Html\HtmlFacade::class, 'Profil' => Bantenprov\ProfilPengguna\Facades\ProfilPengguna::class,
Artisan命令
php artisan profil-pengguna:install
如果成功,则终端或命令提示符将显示如下
Copied Directory [/workbench/bantenprov/profil-pengguna/src/resources/views] To [/resources/views]
Publishing complete.
Copied File [/workbench/bantenprov/profil-pengguna/src/config/config.php] To [/config/profil-pengguna.php]
Publishing complete.
Copied File [/workbench/bantenprov/profil-pengguna/src/stub/traits/trait.stub] To [/app/Traits/ProfilPenggunaTrait.php]
Publishing complete.
Installation done
在routes/web.php中添加Profil::route()
Profil::route();
运行Artisan命令:php artisan route:list --name=profil以查看route name和url
配置
要更改前缀或中间件,可以通过文件config/profil-pengguna.php进行更改
'middleware' => 'auth', 'prefix' => 'dashboard'
特性
要向ProfilPenggunaController类添加不存在的方法,可以在app/Traits/ProfilPenggunaTrait.php中添加。
示例
例如,为了在ProfilPenggunaController类中添加changePicture方法
namespace App\Traits; trait ProfilPenggunaTrait { public function changePicture(\Request $request) { return 'change picture'; } }
因此,在routes/web.php中可以添加如下
Profil::route(); //... Route::get('/profil/change-picture','\Bantenprov\ProfilPengguna\Http\Controllers\ProfilPenggunaController@changePicture')->name('profil.change-picture');