全文検索:
- 05 FormServiceProvider
- unction() use($app) { $data = array( 'name' => 'Your name', 'email' => 'Your email', ); $form = $app['form.factory']->createBuilder('form', $data) ->add('name') ->add('email') ->add('gender', ... {{ form_widget(form) }} <input type="submit" name="submit" /> </form> </body> </html> </code> ====
- 17 Laravel 複数データベース接続 @11_php:02_framework:01_laravel
- 7.0.0.1 DB_PORT=3306 DB_DATABASE=database1 DB_USERNAME=root DB_PASSWORD=secret DB_CONNECTION_SECOND=my... T_SECOND=3306 DB_DATABASE_SECOND=database2 DB_USERNAME_SECOND=root DB_PASSWORD_SECOND=secret </code> ==... , 'database' => env('DB_DATABASE'), 'username' => env('DB_USERNAME'), 'password' => env('DB_PASSWORD'), ], 'mysql2' => [ 'driver' => e
- 29 Laravel Custom Validation @11_php:02_framework:01_laravel
- * @return bool */ public function validateName($attribute, $value, $parameters) { if... ===== <code> resources/lang/ja/validation.php 'name' => 'The :attribute no valid name', 'attributes' => [ ... 'family_name_name' => 'ふりがな(せい)', </code> ===== カスタムバリデーションを利
- 02 Silex
- '; $app = new Silex\Application(); $app->get('/{name}', function ($name) use ($app) { return 'Hello '.$app->escape($name); }); $app->run(); </code> 環境 ^ サーバIP ^ Documen... RewriteBase /tools RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
- 16 Laravel コマンドラインアプリケーション @11_php:02_framework:01_laravel
- sample/test.php > protected $signature = 'command:name'; ↓ protected $signature = 'command:test'; prote... code> public function handle() { $name = $this->argument("name"); $this->info("Hello $name"); } </code> ===== オプションを指定する場合 ===== オプション指定 protected $sig
- 30 Laravel Mail @11_php:02_framework:01_laravel
- MAIL_HOST=mail.hogehoge.net MAIL_PORT=25 MAIL_USERNAME=info@hogehoge.net MAIL_PASSWORD=hogepassword MAIL... ources/views/mail/MailSend.blade.php {{$content->name}} さんはじめまして。 テストメール </code> ===== 4.mailableクラスの... uminate\Support\Facades\Mail; $contents->name = $request->get('name'); Mail::to('to@hogehoge.net') ->bcc('bcc@hogehoge.net')
- 40 Laravel SSH/SCP @11_php:02_framework:01_laravel
- 'host' => '10.11.10.11', 'username' => 'hogehoge', 'password' => 'hoge... ); Config::set('remote.connections.production.username', 'XXXXXX'); Config::set('remote.connections.prod... '' \SSH::into('production')->run(array( 'hostname', 'uptime', ),function($line){ $output .=... '' \SSH::into('production')->run(array( 'hostname', 'uptime', ),function($line) use(&$output){
- 26 Laravel FormBuilder @11_php:02_framework:01_laravel
- php artisan make:form Forms/SongForm --fields="name:text, lyrics:textarea, publish:checkbox" <code|a... uildForm() { $this ->add('name', 'text') ->add('lyrics', 'textarea')... php> Route::any('song','SongsController@create')->name('song'); </code> ===== view追加 ===== <code|resou
- 27 Laravel Voyager @11_php:02_framework:01_laravel
- songsになります。 resources/views/vendor/voyager/[slug-name] 以下にbrose.blade.phpとedit-add.blade.phpを置けばオーバライドさ... te::get('songs','Voyager\SongsController@index')->name('voyager.songs.index')->middleware('admin.user');... e::post('songs','Voyager\SongsController@index')->name('voyager.songs.index')->middleware('admin.user');
- 12 Laravel @11_php:02_framework:01_laravel
- laravel newしたとする <code> <VirtualHost *:80> ServerName hogehoge.com DocumentRoot /var/www/vhost/hogehoge... new [--dev] [--5.2] [--] [<name>] 対応 <code> # yum install php-pecl-zip </code>
- 13 laravel-admin @11_php:02_framework:01_laravel
- 127.0.0.1 DB_PORT=3306 DB_DATABASE=XXXXXXX DB_USERNAME=XXXXXXX DB_PASSWORD=XXXXXXX </code> ===== インストール... nt unsigned not null auto_increment primary key, `name` varchar(255) not null, `email` varchar(255) not
- 37 Laravel Config ge @11_php:02_framework:01_laravel
- .php <?php return [ 'hogehoge' => [ 'name' => 'hoge', 'status' => 1, ] ]; >>> c... onfig('const2') => [ "hogehoge" => [ "name" => "hoge", "status" => 1, ], ] <
- 42 Laravel 認証機能 @11_php:02_framework:01_laravel
- rray */ protected $fillable = [ 'name', 'email', 'password', ]; /** * The... (); Route::get('/home', 'HomeController@index')->name('home'); </code> ===== app/Http/Controllers/Home
- 47 Laravelコマンドからコマンドヘルプを呼び出す @11_php:02_framework:01_laravel
- 時に対象コマンドのヘルプが表示されます。 $this->call('help',['command_name'=>'コマンド名']) <code> protected $signature = 'comm... ult: $this->call('help',['command_name'=>'command:TestCommand']); exit;
- 03 Silex Monolog
- vider\MonologServiceProvider(), array( 'monolog.name' => 'AAAA', 'monolog.logfile' => __DIR__.'/log/