Skip to content

Instantly share code, notes, and snippets.

@DB-009
DB-009 / Modules Navbar
Created October 14, 2014 19:03
Dynamic navbar
@for ($i = 1; $i <= count($modules); $i++)
@foreach ($modules as $module)
@if($module->order == $i && $module->parent_id == 0)
@DB-009
DB-009 / apphelper (made for cake)
Created October 14, 2014 15:25
Help meh pwease!
//I want to know If I can make calls like this in laravel
<?php echo $this->App->ancestorsTree($items, array('AppHelper', 'modulesCallback'), 0, 'SystemModule', array('AppHelper', 'addSpacer')); ?>
<?php echo $this->requestAction(array('action' => 'search_system_modules ?>//this line is calling a php page that i pasted under this
/////Search system modules php page
<?php
//
@DB-009
DB-009 / ArtObjs & Exhibit model
Created October 13, 2014 17:58
Model Relationships
///EXHIBIT
public function medias()
{
return $this->hasMany('Media','parent_id','exhibit_id');
}
///ARTOBJ
@if ($noajax==1)
@extends('layouts.master')
@endif
@section('content')
//controller