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 | |
/** | |
* Routes | |
* | |
* | |
*/ | |
Route::group(["before" => "guest"], function() | |
{ |
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
Route::group(["before" => "guest"], function() |
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 NewProject extends \Eloquent { | |
protected $fillable = []; | |
public static $campaignTypes = array( | |
'' => 'Choose One', | |
1 => 'Active', | |
2 => 'inactive', | |
3 => 'Deleted', |
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
$user = Auth::user(); | |
$role = $user->role; |
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
// This returns me all the users in the table... | |
$users = User::all(); | |
// But I would like to search on a field in that users table: | |
$users = User::all()->where('first_name','like','%'.$query.'%')->toArray(); | |
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
class SearchController extends \BaseController { | |
public function appendValue($data, $type, $element) | |
{ | |
// operate on the item passed by reference, adding the element and type | |
foreach ($data as $key => & $item) { | |
$item[$element] = $type; | |
} | |
return $data; |
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
<div class="control-group"> | |
<p class="pull-left">Authorised Viewers</p> | |
@foreach(array_chunk($users->all(), 3) as $row) | |
<div class="controls span2"> | |
@foreach ($users as $user) | |
<label class="checkbox"> | |
<input type="checkbox" value="option{{ $user->id }}" id="option{{ $user->id }}">{{ $user->first_name }} {{ $user->last_name }} | |
</label> |
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
$users = User::select(array('id','role','first_name','last_name')) | |
->where('role','like','manager') | |
->get(array('first_name','last_name')); | |
$telemarketeers = User::select(array('id','role','first_name','last_name')) | |
->where('role','like','telemarketeer') | |
->get(array('first_name','last_name')); | |
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 | |
require_once __DIR__.'/../vendor/autoload.php'; | |
$app = require __DIR__.'/../src/app.php'; | |
require __DIR__.'/../config/prod.php'; | |
require __DIR__.'/../src/controllers.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
<ul class="language_bar_chooser pull-right"> | |
@foreach(LaravelLocalization::getSupportedLocales() as $localeCode => $properties) | |
<li> | |
@if ( $localeCode == LaravelLocalization::getCurrentLocale() ) | |
<a class="active"rel="alternate" hreflang="{{$localeCode}}" href="{{LaravelLocalization::getLocalizedURL($localeCode) }}">{{{ $properties['native'] }}}</a> | |
@else | |
<a rel="alternate" hreflang="{{$localeCode}}" href="{{LaravelLocalization::getLocalizedURL($localeCode) }}">{{{ $properties['native'] }}}</a> | |
@endif | |
</li> | |
@endforeach |
OlderNewer