Skip to content

Commit

Permalink
Admin backend
Browse files Browse the repository at this point in the history
  • Loading branch information
raylight75 committed Apr 13, 2016
1 parent 4a914be commit a97595a
Show file tree
Hide file tree
Showing 36 changed files with 2,531 additions and 2,820 deletions.
5 changes: 0 additions & 5 deletions .buildpath

This file was deleted.

603 changes: 262 additions & 341 deletions .idea/workspace.xml

Large diffs are not rendered by default.

28 changes: 0 additions & 28 deletions .project

This file was deleted.

2 changes: 0 additions & 2 deletions .settings/org.eclipse.php.core.prefs

This file was deleted.

7 changes: 0 additions & 7 deletions .settings/org.eclipse.wst.common.project.facet.core.xml

This file was deleted.

2 changes: 2 additions & 0 deletions app/Http/Controllers/Auth/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class AuthController extends Controller
*
* @return void
*/
protected $redirectPath = '/welcome';

public function __construct()
{
$this->middleware('guest', ['except' => 'getLogout']);
Expand Down
65 changes: 65 additions & 0 deletions app/Http/Controllers/BackendController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php

namespace App\Http\Controllers;

use App\Models\Brands;
use App\Models\Product;
use Request;
use Auth, View;
use DB;

class BackendController extends Controller
{


/**
* Ecommerce-CMS
*
* Copyright (C) 2014 - 2015 Tihomir Blazhev.
*
* LICENSE
*
* Ecommerce-cms is released with dual licensing, using the GPL v3 (license-gpl3.txt) and the MIT license (license-mit.txt).
* You don't have to do anything special to choose one license or the other and you don't have to notify anyone which license you are using.
* Please see the corresponding license file for details of these licenses.
* You are free to use, modify and distribute this software, but all copyright information must remain.
*
* @package ecommerce-cms
* @copyright Copyright (c) 2014 through 2015, Tihomir Blazhev
* @license http://opensource.org/licenses/MIT MIT License
* @version 1.0.0
* @author Tihomir Blazhev <raylight75@gmail.com>
*/

/**
*
* Backend Class for Admin Panel
*
* @package ecommerce-cms
* @category Base Class
* @author Tihomir Blazhev <raylight75@gmail.com>
* @link https://raylight75@bitbucket.org/raylight75/ecommerce-cms.git
*/

/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$data = Product::prepareGlobalData();
View::share($data);
}

/**
* Show the home page to the user.
*
* @return Response
*/

public function index()
{
return view('backend/content');
}
}
10 changes: 6 additions & 4 deletions app/Http/Controllers/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use App\Models\Product;
use Request;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Session;
use Auth, View;
use DB;

Expand Down Expand Up @@ -145,11 +146,12 @@ public function userLogin()
return view('frontend/login');
}

public function testapi()
public function welcome()
{
$data['brands'] = Brands::all();
$data['latest'] = Product::orderBy('product_id', 'desc')->take('6')->get();
return view('frontend/livesearch', $data);
//redirect trait AuthenticatesUsers getLogout()
$user = Auth::user()->name;
Session::flash('flash_message', 'You have been successfully Logged In!');
return view('messages/welcome')->with('user',$user);
}

public function api()
Expand Down
6 changes: 5 additions & 1 deletion app/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@
return view('welcome');
});

Route::get('home', 'HomeController@index');
Route::get('/home', 'HomeController@index');

Route::get('/aboutus', 'BaseController@aboutus');

Route::get('/cms', 'BaseController@index');

Route::get('/contacts', 'BaseController@contacts');

Route::get('/welcome', 'BaseController@welcome');

Route::get('/frame/{id}', 'BaseController@frame');

Route::get('/login', 'BaseController@userlogin');
Expand All @@ -37,6 +39,8 @@

Route::get('products/search', 'ProductController@search');

Route::get('backend', 'BackendController@index');

Route::resource('products','ProductController');

Route::controller('cart','CartController');
Expand Down
Loading

0 comments on commit a97595a

Please sign in to comment.