Example #1
0
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
// Route::get('/', function () {
//     return view('welcome');
//
// });
Route::get('/', 'boxofficecontroller@show');
Route::post('save', 'mastercontroller@saverecord');
Route::post('update', 'mastercontroller@updaterecord');
Route::post('showdata', 'mastercontroller@display');
Route::get('/home', 'mastercontroller@index');
Route::Get('/boxoffice', 'mastercontroller@boxoffice');
Route::post('editdata', 'mastercontroller@edit');
Route::post('deletedata', 'mastercontroller@delete');
Route::get('/auth/facebook', 'Auth\\AuthController@redirectToProvider');
Route::get('/callback', 'Auth\\AuthController@handleProviderCallback');
Example #2
0
//       $user->save();
//
//       return Response::json(array('token' =>$token,'user'=>$user->toArray()));
//   }
//    catch(exception $e)
//    {
//        App::abort(404,$e->getMessage());
//    }
//});
Route::Get('API/login/{email}/{password}', function ($email, $password) {
    $credentials = array('email' => $email, 'password' => $password);
    if (Auth::once($credentials)) {
        $token = hash('sha256', Str_random(60), false);
        //產生隨機編碼放入token
        $user = Auth::user();
        //取得user model
        $user->api_token = $token;
        //準備把 token 存入資料庫
        $user->save();
        return Response::json(array('token' => $token, 'user' => $user->toArray()));
        //把資料以 json 格式回應成網頁
    }
});
Route::post('post', function () {
    $email = Request::input('email');
    $password = Request::input('password');
    $credentials = array('email' => $email, 'password' => $password);
    if (Auth::once($credentials)) {
        $token = hash('sha256', Str_random(60), false);
        //產生隨機編碼放入token
        $user = Auth::user();
        //取得user model
Example #3
0
        Mail::send('home', ['name' => 'leontin'], function ($message) {
            $message->to('*****@*****.**', 'leontin')->from('*****@*****.**')->subject('welcome');
        });
    });
    Route::group(['middleware' => ['auth']], function () {
        Route::get('category/create', 'CategoryController@create');
        Route::post('category/store', 'CategoryController@store');
        Route::get('/product/create', 'ProductController@create');
        Route::post('/product/store', 'ProductController@store');
        Route::get('/cart/index', 'CartController@index');
        Route::get('/cart/increase/{id}', 'CartController@increase');
        Route::get('/cart/decrease/{id}', 'CartController@decrease');
        Route::get('/cart/delete/{id}', 'CartController@delete');
        Route::post('/comment/store', 'CommentController@store');
        Route::post('/finish-order', 'CartController@finish');
        Route::get('comment/delete/{id}', 'CommentController@delete');
        Route::get('comment/edit/{id}', 'CommentController@edit');
        Route::post('comment/update', 'CommentController@update');
        Route::get('finish-cart', 'CartController@finish');
        Route::get('/order-history', 'CartController@history');
        Route::get('/edit-profile', 'UserController@edit_profile');
        Route::get('/user-profile', 'UserController@profile');
        Route::post('/profile/update', 'UserController@update_profile');
        Route::get('/edit/product/{id}', 'ProductController@edit');
        Route::post('/update/product', 'ProductController@update');
        Route::get('order-details/{id}', 'CartController@order_details');
    });
    Route::get('/to-cart/{id}', 'CartController@add')->where('id', '[0-9]+');
    Route::Get('/product/{slug}', 'ProductController@show');
    Route::get('/category/{slug}', 'CategoryController@show');
});
Example #4
0
<?php

/******************************************************************************************************************************
 *
 *	AUTHOR		: Jan Klemmensen 
 *	CREATED		: 1/8/2014
 *
 *  PURPOSE		: This is where you define your routes - At the moment GET and POST can be used
 *				  Adding wildcards  : Route::Get( '/users/:id', 'IndexController', 'getIndex' );
 *				  Getting wildcards : echo Route::Request('id'); ******************************************************************************************************************************
*/
# Index page
Route::Get('/', 'IndexController', 'getIndex');
Route::Post('/', 'IndexController', 'postIndex');
<?php

require_once "Route/config.php";
/**
 *	Route List 
 *  Author: Vincent Nacar
 */
// add your route here
Route::Get("Register", function () {
    require_once "View/Register-template/Register.php";
});
Route::Get("Register-Submit", function () {
    require_once "View/Register-template/Register-status.php";
});
Route::Get("Login", function () {
    require_once "View/login-template/Login.php";
});
Example #6
0
use App\Models\SiteComponents\HomePage;
use App\Models\People\Employee;
use App\Models\Internal\ZipCode;
use App\Models\SiteComponents\Gallery;
use App\Models\SiteComponents\NewsArticle;
use App\Models\SiteComponents\Special;
use App\Models\SiteComponents\ImageList;
use App\Http\Controllers\Sitemap;
use App\Models\Forms\BuildingQuote;
use App\Models\Forms\EmploymentApp;
use App\Models\Forms\ContactForm;
Route::get('api/token', function () {
    return csrf_token();
});
Route::Get('locations-test', function () {
    return "<a href=\"/?location=1\">Brookhaven</a><br />\n\t<a href=\"/?location=2\">Lake Charles</a><br />\n\t<a href=\"/?location=3\">Tupelo</a><br />\n\t<a href=\"/?location=4\">Benton</a><br />\n\t<a href=\"/?location=5\">Jackson</a><br />\n\t";
});
Route::resource('api/employees', 'People\\EmployeeController');
Route::resource('api/images', 'SiteComponents\\ImageController');
Route::resource('api/locations', 'SiteComponents\\LocationController');
Route::resource('api/galleries', 'SiteComponents\\GalleryController');
Route::resource('api/buildingcomponents/canopies', 'BuildingComponents\\CanopyController');
Route::resource('api/buildingcomponents/framedopenings', 'BuildingComponents\\FramedOpeningController');
Route::post('api/images/upload', 'SiteComponents\\ImageController@upload');
Route::post('api/images/attach', 'SiteComponents\\ImageController@attach');
Route::post('api/locations/upload-logo', 'SiteComponents\\LocationController@uploadLogo');
Route::post('api/locations/upload-aerial', 'SiteComponents\\LocationController@uploadAerial');
Route::post('api/locations/upload-slider', 'SiteComponents\\LocationController@uploadSlider');
Route::post('api/locations/order-slider', 'SiteComponents\\LocationController@orderSlider');
Route::post('api/locations/edit-slider/{id}', 'SiteComponents\\LocationController@editSlider');
Route::resource('api/forms/recipients', 'People\\FormRecipients');
Example #7
0
Route::get('/home/members', 'HomeController@members');
Route::get('/home/announcements', 'HomeController@announcements');
Route::get('/home/legal', 'HomeController@legal');
Route::get('/home/faq', 'HomeController@faq');
Route::get('/create/acc_details', 'HomeController@update');
Route::post('/create/acc_details/process', 'HomeController@handleUpdate');
Route::get('/create/questionnaire', 'HomeController@updateQuestionnaire');
Route::post('/create/questionnaire/process', 'HomeController@handleUpdateQuestionnaire');
Route::get('/edit_profile', 'HomeController@updateProfile');
Route::post('/edit_profile/process', 'HomeController@handleUpdateProfile');
// Routes for InvestmentController
Route::model('investment', 'App\\Investment');
Route::get('/investment', 'InvestmentController@index');
Route::get('/investment/create', 'InvestmentController@create');
Route::post('/investment/create/process', 'InvestmentController@handleCreate');
Route::get('/investment/list', 'InvestmentController@investedBusiness');
Route::get('/payment/list/investor', 'InvestmentController@paymentListInvestor');
Route::get('/payment/list/investor/detail/{investment}', 'InvestmentController@paymentListInvestorDetail');
// Routes for BusinessController
Route::model('business', 'App\\Business');
Route::get('/business', 'BusinessController@index');
Route::get('/business/create', 'BusinessController@create');
Route::post('/business/create/process', 'BusinessController@handleCreate');
Route::get('/business/list', 'BusinessController@showBusiness');
Route::get('/business/list/detail/{business}', 'BusinessController@showBusinessDetail');
Route::get('/business/list/detail/investor/{business}', 'BusinessController@showBusinessDetailForInvestor');
Route::Get('/available_business/list/detail/{business}', 'BusinessController@showListOfAvailableBusinessDetailForInvestor');
Route::post('/business/agreement', 'BusinessController@agreement');
Route::get('/payment/list/business_issuer', 'BusinessController@paymentListBusinessIssuer');
Route::get('/payment/list/business_issuer/detail/{business}', 'BusinessController@paymentListBusinessIssuerDetail');
Route::post('/payment/list/business_issuer/detail/process_payment', 'BusinessController@processPayment');