2016-10-13 04:56:01 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Web Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| This file is where you may define all of the routes that are handled
|
|
|
|
| by your application. Just tell Laravel the URIs it should respond
|
|
|
|
| to using a Closure or controller method. Build something great!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2016-10-20 14:40:52 +00:00
|
|
|
// The default home page
|
|
|
|
Route::get('/', function () {
|
|
|
|
return view('welcome');
|
|
|
|
});
|
|
|
|
|
|
|
|
// Generic Image Renderer - Render images that we dont have with a generic image
|
|
|
|
Route::get('image/generic/{width}/{height}/{color}','MediaController@image')->name('image');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Route::get('/login', function()
|
|
|
|
{
|
|
|
|
return View::make('page-login');
|
|
|
|
})->name('login');
|
|
|
|
*/
|
|
|
|
Route::group(['middleware'=>['setTheme:metronic-fe']], function() {
|
|
|
|
/* Route::get('/', function()
|
|
|
|
{
|
|
|
|
return View::make('home');
|
|
|
|
})->name('home');
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
Route::get('/kangaroos', function()
|
|
|
|
{
|
|
|
|
return View::make('kangaroos');
|
|
|
|
})->name('kangaroos');
|
|
|
|
|
|
|
|
|
|
|
|
// Render site specific images
|
|
|
|
#Route::get('image/site/','MediaController@imagesite')->name('imagesite');
|
|
|
|
});
|
|
|
|
|
|
|
|
Route::group(['prefix'=>'public','namespace'=>'public','middleware'=>['setTheme:metronic-be']], function() {
|
|
|
|
|
|
|
|
Route::get('/', function()
|
|
|
|
{
|
|
|
|
return View::make('home');
|
|
|
|
})->name('public');
|
|
|
|
|
|
|
|
Route::get('/page-about', function()
|
|
|
|
{
|
|
|
|
return View::make('page-about');
|
|
|
|
})->name('public.page-about');
|
|
|
|
|
|
|
|
Route::get('/page-services', function()
|
|
|
|
{
|
|
|
|
return View::make('page-services');
|
|
|
|
})->name('public.page-services');
|
|
|
|
|
|
|
|
Route::get('/page-prices', function()
|
|
|
|
{
|
|
|
|
return View::make('page-prices');
|
|
|
|
})->name('public.page-prices');
|
|
|
|
|
|
|
|
Route::get('/page-faq', function()
|
|
|
|
{
|
|
|
|
return View::make('page-faq');
|
|
|
|
})->name('public.page-faq');
|
|
|
|
|
|
|
|
Route::get('/page-gallery', function()
|
|
|
|
{
|
|
|
|
return View::make('page-gallery');
|
|
|
|
})->name('public.page-gallery');
|
|
|
|
|
|
|
|
Route::get('/page-search-result', function()
|
|
|
|
{
|
|
|
|
return View::make('page-search-result');
|
|
|
|
})->name('public.page-search-result');
|
|
|
|
|
|
|
|
Route::get('/page-forgotton-password', function()
|
|
|
|
{
|
|
|
|
return View::make('page-forgotton-password');
|
|
|
|
})->name('public.page-forgotton-password');
|
|
|
|
|
|
|
|
Route::get('/page-reg-page', function()
|
|
|
|
{
|
|
|
|
return View::make('page-reg-page');
|
|
|
|
})->name('register');
|
|
|
|
|
|
|
|
Route::get('/page-careers', function()
|
|
|
|
{
|
|
|
|
return View::make('page-careers');
|
|
|
|
})->name('public.page-careers');
|
|
|
|
|
|
|
|
Route::get('/page-site-map', function()
|
|
|
|
{
|
|
|
|
return View::make('page-site-map');
|
|
|
|
})->name('public.page-site-map');
|
|
|
|
|
|
|
|
Route::get('/page-contacts', function()
|
|
|
|
{
|
|
|
|
return View::make('page-contacts');
|
|
|
|
})->name('public.page-contacts');
|
|
|
|
|
|
|
|
Route::get('/portfolio-item', function()
|
|
|
|
{
|
|
|
|
return View::make('portfolio-item');
|
|
|
|
})->name('public.portfolio-item');
|
|
|
|
|
|
|
|
Route::get('/blog', function()
|
|
|
|
{
|
|
|
|
return View::make('blog');
|
|
|
|
})->name('public.blog');
|
|
|
|
|
|
|
|
Route::get('/blog-item', function()
|
|
|
|
{
|
|
|
|
return View::make('blog-item');
|
|
|
|
})->name('public.blog-item');
|
|
|
|
|
|
|
|
Route::get('/page-404', function()
|
|
|
|
{
|
|
|
|
return View::make('page-404');
|
|
|
|
})->name('public.page-404');
|
|
|
|
|
|
|
|
Route::get('/page-500', function()
|
|
|
|
{
|
|
|
|
return View::make('page-500');
|
|
|
|
})->name('public.page-500');
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
Route::group(['prefix'=>'demo','namespace'=>'sbadmin','middleware'=>['setTheme:sbadmin']], function() {
|
2016-10-14 04:06:12 +00:00
|
|
|
|
|
|
|
Route::get('/', function()
|
|
|
|
{
|
|
|
|
return View::make('home');
|
|
|
|
})->name('demo');
|
|
|
|
|
|
|
|
Route::get('/charts', function()
|
|
|
|
{
|
|
|
|
return View::make('mcharts');
|
|
|
|
})->name('demo.charts');
|
|
|
|
|
|
|
|
Route::get('/tables', function()
|
|
|
|
{
|
|
|
|
return View::make('table');
|
|
|
|
})->name('demo.tables');
|
|
|
|
|
|
|
|
Route::get('/forms', function()
|
|
|
|
{
|
|
|
|
return View::make('form');
|
|
|
|
})->name('demo.forms');
|
|
|
|
|
|
|
|
Route::get('/grid', function()
|
|
|
|
{
|
|
|
|
return View::make('grid');
|
|
|
|
})->name('demo.grid');
|
|
|
|
|
|
|
|
Route::get('/buttons', function()
|
|
|
|
{
|
|
|
|
return View::make('buttons');
|
|
|
|
})->name('demo.buttons');
|
|
|
|
|
|
|
|
Route::get('/icons', function()
|
|
|
|
{
|
|
|
|
return View::make('icons');
|
|
|
|
})->name('demo.icons');
|
|
|
|
|
|
|
|
Route::get('/panels', function()
|
|
|
|
{
|
|
|
|
return View::make('panel');
|
|
|
|
})->name('demo.panels');
|
|
|
|
|
|
|
|
Route::get('/typography', function()
|
|
|
|
{
|
|
|
|
return View::make('typography');
|
|
|
|
})->name('demo.typography');
|
|
|
|
|
|
|
|
Route::get('/notifications', function()
|
|
|
|
{
|
|
|
|
return View::make('notifications');
|
|
|
|
})->name('demo.notifications');
|
|
|
|
|
|
|
|
Route::get('/blank', function()
|
|
|
|
{
|
|
|
|
return View::make('blank');
|
|
|
|
})->name('demo.blank');
|
|
|
|
|
|
|
|
Route::get('/login', function()
|
|
|
|
{
|
|
|
|
return View::make('login');
|
|
|
|
})->name('demo.login');
|
|
|
|
|
|
|
|
Route::get('/documentation', function()
|
|
|
|
{
|
|
|
|
return View::make('documentation');
|
|
|
|
})->name('demo.documentation');
|
|
|
|
|
2016-10-13 04:56:01 +00:00
|
|
|
});
|
2016-10-20 14:40:52 +00:00
|
|
|
|
|
|
|
#Auth::routes();
|
|
|
|
#
|
|
|
|
#Route::get('/home', 'HomeController@index');
|
|
|
|
#Route::get('/test', 'TestController@index');
|
|
|
|
|
|
|
|
DB::enableQueryLog();
|
|
|
|
|
|
|
|
DB::listen(
|
|
|
|
function ($sql) {
|
|
|
|
foreach ($sql->bindings as $i => $binding) {
|
|
|
|
if ($binding instanceof \DateTime) {
|
|
|
|
$sql->bindings[$i] = $binding->format('\'Y-m-d H:i:s\'');
|
|
|
|
} else {
|
|
|
|
if (is_string($binding)) {
|
|
|
|
$sql->bindings[$i] = "'$binding'";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Insert bindings into query
|
|
|
|
$query = str_replace(array('%', '?'), array('%%', '%s'), $sql->sql);
|
|
|
|
|
|
|
|
$query = vsprintf($query, $sql->bindings);
|
|
|
|
|
|
|
|
// Save the query to file
|
|
|
|
$logFile = fopen(
|
|
|
|
storage_path('logs' . DIRECTORY_SEPARATOR . date('Y-m-d') . '_query.log'),
|
|
|
|
'a+'
|
|
|
|
);
|
|
|
|
fwrite($logFile, date('Y-m-d H:i:s') . ': ' . $query . PHP_EOL);
|
|
|
|
fclose($logFile);
|
|
|
|
}
|
|
|
|
);
|