This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // original auth filter | |
| Route::filter('auth', function() | |
| { | |
| if (Auth::guest()) return Redirect::guest('login'); | |
| }); | |
| // new multiauth filter | |
| Route::filter('auth', function() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // original | |
| return array( | |
| 'driver' => 'eloquent', | |
| 'model' => 'User', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Illuminate\Database\Schema\Blueprint; | |
| use Illuminate\Database\Migrations\Migration; | |
| class CreateAclGroupPermissionsTable extends Migration | |
| { | |
| /** | |
| * Run the migrations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.ollieread.technomagi.block; | |
| import net.minecraft.block.material.Material; | |
| import net.minecraft.client.renderer.texture.IIconRegister; | |
| import net.minecraft.entity.player.EntityPlayer; | |
| import net.minecraft.tileentity.TileEntity; | |
| import net.minecraft.world.World; | |
| import com.ollieread.technomagi.TechnoMagi; | |
| import com.ollieread.technomagi.common.CommonProxy; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $baseurl = 'http://myjenkinsurl/job/jobname'; | |
| $buildJsonDirty = @file_get_contents($baseurl . '/api/json'); | |
| if($buildJsonDirty) { | |
| $buildJsonClean = json_decode($buildJsonDirty, true); | |
| $builds = $buildJsonClean['builds']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| Route::group(['namespace' => 'ModBin\Controllers'], function() | |
| { | |
| Route::group(['prefix' => '/user'], function() | |
| { | |
| Route::group(['before' => 'guest'], function() | |
| { | |
| Route::get('/create', [ | |
| 'as' => 'user.create', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php namespace Ollieread\Toolkit\Repositories; | |
| class BaseRepository | |
| { | |
| public function setModel($model); | |
| public function setValidator($validator); | |
| public function setContext($context); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class MyValidator extends BaseValidator | |
| { | |
| public static $rules = [ | |
| 'create' => [ | |
| 'field' => ['rule1', 'rule2'] | |
| ], | |
| 'update' => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Activity | |
| { | |
| public static function log(Model $user, Model $subject, $action) | |
| { | |
| $log = $this->user->logs()-.>create(['action'] => $action]); | |
| $log->subject()->save($subject); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if($validator->fails()){ | |
| return Response::json(['error' => 1, | |
| 'msg'=>$validator->errors() | |
| ]); | |
| } | |
| else{ | |
OlderNewer