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="nav navbar-top-links navbar-right"> | |
<li class="dropdown"> | |
<a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false"> | |
<i class="fa fa-globe fa-fw"></i> {{{ $currentLocale }}} <i class="fa fa-caret-down"></i> | |
</a> | |
<ul class="dropdown-menu" style="min-width:100px;"> | |
@foreach ($locales as $locale => $localeData) | |
<li> | |
<a href="{{{ Admin::instance()->router->routeToWildcard('locale/switch') }}}?locale={{{ $locale }}}"> | |
<div> |
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 | |
use Illuminate\Database\Eloquent\ModelNotFoundException; | |
class MonumentsController extends Controller | |
{ | |
public function getIndex() | |
{ | |
$article = Article::whereUrl('system/monuments')->first(); |
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 namespace App\Http\Controllers\Shop; | |
use App\Http\Controllers\Controller; | |
use App\Repositories\CartRepository; | |
use App\Repositories\OrderRepository; | |
use App\Repositories\UserRepository; | |
use Config; | |
use Illuminate\Http\Request; | |
use Redirect; | |
use View; |
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 namespace App\Http\Middleware; | |
use Closure; | |
use Config; | |
use Illuminate\Http\Request; | |
use Session; | |
class AdminLocale | |
{ |
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
# admin/bootstrap.php | |
FormItem::register('autocomplete', App\Misc\FormItems\AutocompleteFormItem::class); | |
# app/Misc/FormItems/AutocompleteFormItem.php | |
<?php namespace App\Misc\FormItems; | |
use AssetManager; |
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
public function get_reviews($rest_id = 0) | |
{ | |
if ( ! $rest_id) | |
{ | |
return; | |
} | |
return $this->get('/site/all/main/' . $rest_id . '/opinions/', Apist::filter('.posts_c .post')->each([ | |
'date' => Apist::filter('.post_date')->text()->call(function ($date) | |
{ | |
return strtotime($date); |
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 RestoclubApi extends Apist | |
{ | |
public function getBaseUrl() | |
{ | |
return 'http://www.restoclub.ru'; | |
} | |
public function get_reviews($rest_id = 0) | |
{ | |
if ( ! $rest_id) |
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 Product extends \Eloquent | |
{ | |
public function category() | |
{ | |
return $this->belongsTo('Category'); | |
} | |
public function options() | |
{ |