This file contains 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
@extends('test') | |
@section('content') | |
##Test 2 | |
@parent | |
@stop |
This file contains 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
@extends('test') | |
@section('content') | |
##Test 2 | |
@parent | |
@stop |
This file contains 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::get('1', function() | |
{ | |
return View::make('test1'); | |
}); | |
Route::get('2', function() | |
{ | |
return View::make('test2')->with('message', 'Test 2 - Php'); |
This file contains 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::get('protected', array('before' => 'auth|has_role:admin', function(){ | |
return "sekrit"; | |
})); | |
Route::filter('has_role', function($role) { | |
if ( ! Auth::user()->has_role($role) ) { | |
return 'unauthorized'; | |
} |
This file contains 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 // application/models/user.php | |
class User extends Eloquent | |
{ | |
public static $hidden = array('password'); | |
public function set_password($value) | |
{ | |
return $this->attributes['password'] = Hash::make($value); | |
} |
This file contains 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
@section('content') | |
Some Content | |
@endsection | |
@section('title') | |
Some Content | @parent | |
@endsection |
This file contains 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
def send(self, command, *args, **kwargs): | |
#data is base64 encoded later | |
data = kwargs.pop('data', None) | |
# all commands must have a transaction id | |
tid = self.transaction_id | |
parts = [command, '-i %d' % tid] | |
if args: # extra arguments |
This file contains 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 PageController extends Controller { | |
/** | |
* Blog Posts | |
* | |
* @var array | |
**/ | |
protected $posts; |
This file contains 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
Foo | |
@yield('content') | |
Bar |
This file contains 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 | |
/* | |
|-------------------------------------------------------------------------- | |
| Register The Artisan Commands | |
|-------------------------------------------------------------------------- | |
| | |
| Each available Artisan command must be registered with the console so | |
| that it is available to be called. We'll register every command so | |
| the console gets access to each of the command object instances. |