2013-12-01ãã1ã¶æéã®è¨äºä¸è¦§
nameè¦ç´ ã«[]ãã¤ããã¨é åã«ãªãã <select multiple data-rel="chosen" class="span10" name="tags[]"> @foreach($tags as $tag) <option>{{ $tag->name }}</option> @endforeach </select>
Form::modelã使ãå ´åã¯ãæ¢ã«å ¥ã£ã¦ããå¤ãèªåçã«åå¾ãã¦ãããã®ã§ä¾¿å©ã注æããã®ã¯åæå¤ãæå®ããã¨ãã¯nullã«ãããã¨ã {{ Form::model($title,[ 'method' => 'put', 'route' => ['title.update',$title->id], 'class' => 'form-horizontal' ]â¦
jQuery-UIã®datepickerã¯MySQLãã©ã¼ãããã«ãããã MySQLã®Dateåã¯ãyy-mm-ddããªã®ã§ãjQuery-UIã®datepickerã¯ããã©ã«ãã®ã¾ã¾ã ã¨ä½¿ããªãã 以ä¸ã®ããã«è¨å®ãå¤ããå¿ è¦ãããã $(function() { $(".datepicker").datepicker("option", "dateFormâ¦
MySQLã«ãNO_ZERO_DATEããæå®ããã¨ãLaravelãåããªããªã£ããã©ãããtimestamps()ãéåãããããã SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at'
Formã§selectæ¸ãã¨ãã¯ããããã®ãã {{ Form::select('bunrui', ['PHP', 'Perl', 'Ruby'], 'PHP',['data-rel'=>'chosen']) }}以ä¸ã®ããã«åºåãããã <select data-rel="chosen" name="bunrui"> <option>PHP</option> <option>PHP</option> <option>Perl</option> <option>Ruby</option> </select>
Bladeå´ã§FormãModelã¨ä¸è´ãããã {{ Form::model($title,[]) }}ããããã¨Controllerå´ã§ããããæ¸ãæ¹ãã§ãã¦æ¥½ã $title = Title::find($id); $inputs = Input::all(); $title->update($inputs);
Laravelã§ãã¡ã¤ã«ã¢ãããã¼ããããå ´åã Bladeå´ {{ Form::open(['action' => ['TitleController@upload'], 'files' => true]) }} <fieldset> ã¯ãªãã¯ãã¦CSVãã¡ã¤ã«ãé¸æãã¦ãã ãã â <input class="input-file uniform_on" type="file" name="csv"> <div class="form-actions"> <button type="submit" class="btn btn-warning">ã¢ãããã¼ã</button> /div> â¦</div></fieldset>
HTML::styleã§IDãæå®ãããå ´åã¯ä¾ã«ãã£ã¦å¼æ°ã§æ¸¡ãã {{ HTML::style('ashley/css/colors.css',['id'=>'colors']) }}<link id="colors" media="all" type="text/css" rel="stylesheet" href="http://localhost/ashley/css/colors.css"></link>
Laravel 4.1ãã¤ãã«åºãï¼ã¨æã£ãããã§ã«4.1.1ã«ãªã£ã¦ããã
èªä½ã³ãã³ããä½ã£ãå ´åãoptionã¡ã½ããã®æ»ãå¤ã¯ãªãã·ã§ã³ã®æç¡ã®çå½å¤ãªã®ã§ãã$this->option('auto')ãã®çµæã¯TrueãFalseã ã以ä¸ã¿ããã«æ¸ããã public function fire() { if ($this->option('auto')) { echo 'Hello'; } } protected functiâ¦
ä¾ãã°èªè¨¼ããã±ã¼ã¸ã®confideã§migrateãå®è¡ãããã¨ã㯠php artisan migrate --package=zizaco/confideãå®è¡ããã°ããvendor\zizaco\confide\src\migrationsããã©ã«ãå ãèªã¿è¾¼ã¾ããããããèªä½ã®ããã±ã¼ã¸ã ã¨workbenchå ã«ç½®ãããã®ã§ããæ¹â¦
find()ã®ããã«çµæãä¸ä»¶ã ãåå¾ãããã¨ãã¯first()ã使ãã $title = Title::where('name','=',$name)->first();
ä»ã«ãæ¹æ³ããããã ãã©ãã¨ããããâ¦ã ãapp\startããã©ã«ãå ã«ãconstants.phpããä½ã£ã¦ãä¸ã«å®æ°å¤ãè¨è¿°ããã
ãããªã¨ã©ã¼ãåºãã C:\xampp\arana>php artisan workbench futari/rei --resources Package workbench created! [Composer\Json\JsonValidationException] "./composer.json" does not match the expected JSON schema: - authors[0] : the property nameâ¦
Form::openã§ã¡ã½ããã¨ã¯éãURLã®è¦ç´ ã使ãããã¨ãã¯ä»¥ä¸ã®ããã«ããã {{ Form::open(['action' => 'VoteController@reset','url'=>'delete']) }}åºåã¯ãããªãã <form method="POST" action="http://localhost/delete" accept-charset="UTF-8"></form>
Laravelã®ããã¥ã¡ã³ãã«ã¯ããã¡ãµã¼ããå§ããåã«IoCã³ã³ãããç¿å¾ãã¨ããï¼ãã£ã¦å¼·ãã«æ¸ãã¦ãããããããAuthãã£ã¦æ¸ãã ãã§ã¡ã½ãããå¼ã³åºããã¨ãã§ãããã¡ãµã¼ãããã使ãããã£ãã®ã§ãããªããã£ã¦ã¿ããæªã ã«IoCã³ã³ããã¯ããããªãâ¦