full() публичный статический Метод

Get the full URL for the current request.
public static full ( ) : string
Результат string
Пример #1
0
 public function getIndex($option = null)
 {
     Session::put('curr_page', URL::full());
     $view = View::make('home');
     $view['sid'] = Session::getId();
     return $view;
 }
 public function editAction()
 {
     $form = new ProductoForm();
     $idinventario = Input::get("ID_INVENTARIO");
     $producto = Producto::findOrFail($idinventario);
     $url = URL::full();
     $this->getRuta();
     //die();
     if ($form->isPosted()) {
         if ($form->isValidForEdit()) {
             //$producto->ID_INVENTARIO = Input::get("ID_INVENTARIO");
             $producto->ID_VENTA = Input::get("id_venta_txt");
             $producto->ID_PRODUCTO = Input::get("id_producto_txt");
             $producto->ID_RUTA = Input::get("id_ruta_txt");
             $producto->NOMBRE_PRODUCTO = Input::get("nombre_producto_txt");
             $producto->DISPONIBLE = Input::get("disponible_chk");
             //die (var_dump($producto->ID_VENTA ).var_dump($producto->ID_PRODUCTO ).var_dump($producto->ID_RUTA ).var_dump($producto->NOMBRE_PRODUCTO ).var_dump($producto->DISPONIBLE ));
             $producto->save();
             return Redirect::route($this->routeIndex);
         }
         return Redirect::to($url)->withInput(["ID_INVENTARIO" => Input::get("ID_INVENTARIO"), "producto" => $producto, "errors" => $form->getErrors(), "url" => $url]);
     }
     //die($data->name);
     return View::make($this->routeEdit, ["form" => $form, "producto" => $producto, "rutasValidas" => $this->rutasValidas, "HeaderTitle" => trans('producto.editrecord')]);
 }
Пример #3
0
 public function post_create()
 {
     $posts = Input::all();
     $title = $posts['thread_name'];
     $contentRaw = $posts['inputarea'];
     if ($title != '' && strlen($contentRaw) > 10) {
         $alias = Str::slug($title, '-');
         $exist = Thread::where('alias', '=', $alias)->first();
         if ($exist != null) {
             return Redirect::to($exist->id);
         }
         $threadData = array('title' => $posts['thread_name'], 'alias' => $alias, 'type' => 0, 'poster_ip' => Request::ip(), 'dateline' => date("Y-m-d H:i:s"), 'last_message_at' => date("Y-m-d H:i:s"));
         $thread = Thread::create($threadData);
         if ($thread != null) {
             $content = static::replace_at(BBCode2Html(strip_tags_attributes($contentRaw)), $thread->id);
             $postData = array('thread_id' => $thread->id, 'entry' => $content, 'userip' => Request::ip(), 'user_id' => Sentry::user()->id, 'datetime' => date("Y-m-d H:i:s"), 'count' => 1, 'type' => 0);
             $pst = Post::create($postData);
             if ($pst != null) {
                 return Redirect::to($thread->id);
             }
         }
     } else {
         return Redirect::to(URL::full());
     }
 }
Пример #4
0
function sa($item)
{
    if (URL::to($item) == URL::full()) {
        return 'class="active"';
    } else {
        return '';
    }
}
Пример #5
0
 public function __construct(UserRepositoryInterface $user)
 {
     $this->user = $user;
     $this->beforeFilter(function () {
         if (\Auth::user() === null) {
             // Push the intended URL into the session
             \Session::put('url.intended', \URL::full());
             return Redirect::route('home')->with('message', "You must be logged in to continue.")->with('messageStatus', 'danger');
         }
     });
 }
Пример #6
0
 function __construct()
 {
     session_start();
     $_SESSION['url'] = URL::full();
     $auth = Session::get('auth');
     if (empty($auth)) {
         return Redirect::to('login')->send();
     }
     $this->_auth = $auth;
     $this->_user = User::where('openid', $this->_auth['openid'])->first();
 }
 public function action_show()
 {
     $args = array();
     if (is_array(Auth::user()->oauth)) {
         foreach (Auth::user()->oauth as $ligne) {
             $args['have_' . $ligne->provider] = true;
         }
     }
     Session::put('from_url', URL::full());
     return View::make('panel::panel.applications', $args);
 }
Пример #8
0
 public function __construct(ServiceRepositoryInterface $service, StaffRepositoryInterface $staff, LocationRepositoryInterface $locations)
 {
     parent::__construct();
     $this->staff = $staff;
     $this->service = $service;
     $this->locations = $locations;
     $this->beforeFilter(function () {
         if (\Auth::user() === null) {
             // Push the intended URL into the session
             \Session::put('url.intended', \URL::full());
             return Redirect::route('home')->with('message', "You must be logged in to continue.")->with('messageStatus', 'danger');
         }
     });
 }
 public function getContent()
 {
     //@todo automate module simple configuration for Model's columns or settings (conf)
     if (Input::get('illuminatocomments_conf')) {
         $this->conf->set(['GRADES' => Input::has('enable_grades')]);
         $this->conf->set(['COMMENTS' => Input::has('enable_comments')]);
     }
     $html = Form::open(['id' => 'illuminatocomments_form', 'enctype' => 'multipart/form-data', 'url' => URL::full()]);
     $html .= Form::label('enable_grades', 'Enable grades');
     $html .= Form::checkbox('enable_grades', '1', $this->conf->get('GRADES'));
     $html .= Form::label('enable_comments', 'Enable comments');
     $html .= Form::checkbox('enable_comments', '1', $this->conf->get('COMMENTS'));
     $html .= Form::submit('Save', ['name' => 'illuminatocomments_conf', 'id' => 'illuminatocomments_conf']);
     $html .= Form::close();
     return $html;
 }
Пример #10
0
 public function __construct(CreditRepositoryInterface $credits, UserRepositoryInterface $users, CreditValidator $validator, StaffRepositoryInterface $staff)
 {
     parent::__construct();
     $this->staff = $staff;
     $this->users = $users;
     $this->credits = $credits;
     $this->validator = $validator;
     $this->beforeFilter(function () {
         if (\Auth::user() === null) {
             // Push the intended URL into the session
             \Session::put('url.intended', \URL::full());
             // Set the flash message
             Flash::error("You must be logged in to continue.");
             return Redirect::route('home');
         }
     });
 }
 public function editAction()
 {
     $form = new ProveedorForm();
     $keyValue = Input::get($this->key);
     $object = Proveedor::findOrFail($keyValue);
     $url = URL::full();
     $FieldsnameHelper = $this->FieldsName;
     if ($form->isPosted()) {
         $i = 0;
         if ($form->isValidForEdit(0)) {
             $object->{$FieldsnameHelper}['1'] = Input::get($this->FieldsEdit['1']['name'] . $i);
             $object->{$FieldsnameHelper}['2'] = Input::get($this->FieldsEdit['2']['name'] . $i);
             $object->{$FieldsnameHelper}['3'] = Input::get($this->FieldsEdit['3']['name'] . $i);
             $object->{$FieldsnameHelper}['4'] = Input::get($this->FieldsEdit['4']['name'] . $i);
             $object->save();
             return Redirect::route($this->routeIndex);
         }
         return Redirect::to($url)->withInput(["key" => Input::get($this->key), "object" => $object, "errors" => $form->getErrors(), "url" => $url]);
     }
     return View::make($this->routeEdit, ["form" => $form, "object" => $object, "FieldsEdit" => $this->FieldsEdit, "module" => $this->module, "key" => $this->key]);
 }
Пример #12
0
 public function editAction()
 {
     $form = new DataForm();
     $id = Input::get("id");
     $data = Data::findOrFail($id);
     $url = URL::full();
     if ($form->isPosted()) {
         if ($form->isValidForEdit()) {
             $data->name = Input::get("name");
             $data->description = Input::get("description");
             $data->mobile = Input::get("mobile");
             $data->email = Input::get("email");
             $data->web = Input::get("web");
             $data->address = Input::get("address");
             $data->save();
             return Redirect::route($this->routeIndex);
         }
         return Redirect::to($url)->withInput(["name" => Input::get("name"), "data" => $data, "errors" => $form->getErrors(), "url" => $url]);
     }
     //die($data->name);
     return View::make($this->routeEdit, ["form" => $form, "data" => $data, "HeaderTitle" => trans('data.editrecord')]);
 }
Пример #13
0
                    @endif
                    @endforeach
                    @endforeach
                </div>
                <div style="float: left; width: 25%;">
                    <h4 class=""><i class="fa fa-bar-chart-o"></i>
                        @foreach($countAprovDis as $countAprovDisRow)
                            @foreach($countTotalDis as $countTotalDisRow)
                                Aproveitamento: <%$countAprovDisRow->cursadas%> de <% $countTotalDisRow->total_dis%>
                            @endforeach
                        @endforeach
                    </h4>
                </div>
            </div>
            <?php 
Session::put('RoutePage', URL::full());
?>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-bordered table-hover table-striped">
                        <thead>
                        <tr>
                            <th style="width: 6%">Periodo</th>
                            <th>Disciplina</th>
                            <th style="width: 12%">Ano</th>
                            <th style="width: 12%">Status</th>
                            <th style="width: 15%">Opções</th>
                        </tr>
                        </thead>
                        <tbody>
                        @if(count($historico) > 0)
Пример #14
0
        <div class="col-sm-8 col-sm-offset-2">

            <div id="disclosure_text" class="well well-sm text-info">
                {{ get_disclosure_text(true) }}

                <div class="text-center hide">
                    By accepting our Terms you agree that you have read, understand, and accept <br/> the disclosure described above and our <a href="/privacypolicy" onclick="LoadStep('/privacypolicy'); return false;">Privacy Policy</a> <br/>
                </div>

                @include('disclosureagreebtn')

                <div class="gottaagreetho hide"><div class="alert alert-danger">You must agree to these terms to continue.</div></div>


            </div>
        </div>
    </div>
<?php 
$encrypted = Crypt::encrypt(URL::secure(URL::full()));
?>

<input type="hidden" name="rd" value="{{ $encrypted }}">
</form>



@if (Session::get('accepted_disclosure'))
<script>
    jQuery('#disclosure_display_box').addClass('hide');
</script>
@endif
Пример #15
0
                return Redirect::to('/');
            } else {
                // validation not successful
                // send back to form with errors
                // send back to form with old input, but not the password
                return Redirect::to('login')->withErrors($validator)->withInput(Input::except('password'));
            }
        } else {
            // user does not exist in database
            // return them to login with message
            Session::flash('loginError', 'This user does not exist.');
            return Redirect::to('login');
        }
    }
});
Route::get('logout', function () {
    Auth::logout();
    return Redirect::to('/');
});
/* Filters */
Route::filter('auth', function () {
    if (Auth::guest()) {
        Session::put('redirect', URL::full());
        return Redirect::to('login');
    }
    if ($redirect = Session::get('redirect')) {
        Session::forget('redirect');
        return Redirect::to($redirect);
    }
    //if (Auth::guest()) return Redirect::to('login');
});
Пример #16
0
|
|		Route::post(array('hello', 'world'), function()
|		{
|			return 'Hello World!';
|		});
|
| It's easy to allow URI wildcards using (:num) or (:any):
|
|		Route::put('hello/(:any)', function($name)
|		{
|			return "Welcome, $name.";
|		});
|
*/
Route::get('/', function () {
    return "\n<style> a { text-decoration: none } </style>\n<pre>\nphpsprunge(1)                          PHPSPRUNGE                          phpsprunge(1)\n\nNAME\n    phpsprunge: command line pastebin.\n\nSYNOPSIS\n    &lt;command&gt; | curl -F 'sprunge=&lt;-' " . URL::full() . "\n\nDESCRIPTION\n    use <a href='data:text/html,<form action=\"" . URL::full() . "\" method=\"POST\"><textarea name=\"sprunge\" cols=\"80\" rows=\"24\"></textarea><br><button type=\"submit\">sprunge</button></form>'>this form</a> to paste from a browser\n\nEXAMPLES\n    ~\$ cat bin/ching | curl -F 'sprunge=&lt;-' " . URL::full() . "\n       " . URL::to_route('sprunge', ['d41d8cd98f00b204e9800998ecf8427e']) . "\n    ~\$ firefox " . URL::to_route('sprunge', ['d41d8cd98f00b204e9800998ecf8427e']) . "\n\nSEE ALSO\n    http://github.com/KamalN7/php-sprunge\n\n</pre>\n    ";
});
Route::get('/(:any)', ['as' => 'sprunge', function ($hash) {
    $content = Sprunge::where_hash($hash)->first();
    if ($content) {
        return Response::make($content->content, 200, ['Content-Type' => 'text/plain']);
    } else {
        return 'Not found.';
    }
}]);
Route::post('/', function () {
    $sprunge = Input::get('sprunge');
    if (!empty($sprunge)) {
        $hash = md5(uniqid());
        $newsprunge = new Sprunge();
        $newsprunge->hash = $hash;
Пример #17
0
});
Route::get('telecharger, download', array('as' => 'telecharger', function () {
    return Redirect::to('http://laravel.com/download');
}));
Route::get('irc', array('as' => 'irc', function () {
    return view::make('irc.index');
}));
Route::controller(array('contact'));
Event::listen('404', function () {
    return Response::error('404');
});
Event::listen('500', function () {
    return Response::error('500');
});
Route::filter('before', function () {
    // Do stuff before every request to your application...
});
Route::filter('after', function ($response) {
    // Do stuff after every request to your application...
});
Route::filter('csrf', function () {
    if (Request::forged()) {
        return Response::error('500');
    }
});
Route::filter('auth', function () {
    if (Auth::guest()) {
        Session::put('from_url', URL::full());
        return Redirect::to('login');
    }
});
Пример #18
0
Route::get('admin/logout', array('as' => 'admin.logout', 'uses' => 'Ecdo\\Backend\\Controllers\\CpanelController@getLogout'));
Route::get('admin/register', array('as' => 'admin.register', 'uses' => 'Ecdo\\Backend\\Controllers\\CpanelController@getRegister'));
Route::post('admin/register', 'Ecdo\\Backend\\Controllers\\CpanelController@postRegister');
/*
|--------------------------------------------------------------------------
| Admin auth filter
|--------------------------------------------------------------------------
| You need to give your routes a name before using this filter.
| I assume you are using resource. so the route for the UsersController index method
| will be admin.users.index then the filter will look for permission on users.view
| You can provide your own rule by passing a argument to the filter
|
*/
Route::filter('auth.backend', function ($route, $request, $userRule = NULL) {
    if (!Sentry::check()) {
        Session::put('url.intended', URL::full());
        return Redirect::route('admin.login');
    }
    // no special route name passed, use the current name route
    if (is_null($userRule)) {
        list($prefix, $module, $rule) = explode('.', Route::currentRouteName());
        switch ($rule) {
            case 'index':
            case 'show':
                $userRule = $module . '.view';
                break;
            case 'create':
            case 'store':
                $userRule = $module . '.create';
                break;
            case 'edit':
Пример #19
0
            return $response;
        }
    }
    return App::abort(404);
})->where(['type' => '[-a-z]*', 'slug' => '^[-A-Za-z0-9]*', 'id' => '\\d+']);
/*
 * -------------------------------------------
 *  User Routes
 *  ------------------------------------------
 */
//minh
// redirect the user to "/login"
// and stores the url being accessed on session
Route::filter('auth', function () {
    // Save the attempted URL
    Session::put('pre_login_url', URL::full());
});
/* Unauthenticated group */
Route::group(array('prefix' => 'account', 'before' => 'guest'), function () {
    /* CSRF protection */
    Route::group(array('before' => 'csrf'), function () {
        /* Create an account (POST) */
        Route::post('/create', array('as' => 'account-create-post', 'uses' => 'AccountController@postCreate'));
        /* Sign in (POST) */
        Route::post('/sign-in', array('as' => 'account-sign-in-post', 'uses' => 'AccountController@postSignIn'));
    });
    /* Sign in (GET) */
    Route::get('/sign-in', array('as' => 'account-sign-in', 'uses' => 'AccountController@getCreateSignin'));
    /* Create an account (GET) */
    Route::get('/create', array('as' => 'account-create', 'uses' => 'AccountController@getCreateSignin'));
    /* Activate an account */
Пример #20
0
                <tr @if(Session::has('activerole'))
                            {{(Session::get('activerole') == $role->id)?"class='info'":""}}
                        @endif>
                    <td>{{ $role->name }}</td>
                    <td>{{ $role->description }}</td>
                    <td>
                        <a class="btn btn-sm btn-info {{($role == Role::getAdminRole()) ? 'disabled': ''}}" 
                            href="{{ URL::to("role/" . $role->id . "/edit") }}" >
                            <span class="glyphicon glyphicon-edit"></span>
                            {{ trans('messages.edit') }}
                        </a>
                        <button class="btn btn-sm btn-danger delete-item-link {{($role == Role::getAdminRole()) ? 'disabled': ''}}" 
                            data-toggle="modal" data-target=".confirm-delete-modal" 
                            data-id='{{ URL::to("role/" . $role->id . "/delete") }}'>
                            <span class="glyphicon glyphicon-trash"></span>
                            {{ trans('messages.delete') }}
                        </button>
                    </td>
                </tr>
            @empty
                <tr><td colspan="2">{{ trans('messages.no-roles-found') }}</td></tr>
            @endforelse
            </tbody>
        </table>
        <?php 
echo $roles->links();
Session::put('SOURCE_URL', URL::full());
?>
    </div>
</div>
@stop
Пример #21
0
| Repository Error
|--------------------------------------------------------------------------
|
| Sent when an Entity couldn't be found in the Repositories.
|
*/
App::error(function (ModelNotFoundException $e) {
    return Response::json(['reason' => 'Requested Resource not found', 'links' => [['rel' => 'self', 'href' => URL::full()]]], 404);
});
/*
|--------------------------------------------------------------------------
| Database Error
|--------------------------------------------------------------------------
|
| Redis doesn't respond to Requests
|
*/
App::error(function (\Predis\Connection\ConnectionException $e) {
    return Response::json(['reason' => 'The Cache server is not responding', 'links' => [['rel' => 'self', 'href' => URL::full()]]], 500);
});
/*
|--------------------------------------------------------------------------
| Database Error
|--------------------------------------------------------------------------
|
| The Relational Database doesn't respond to Requests.
|
*/
App::error(function (\Doctrine\DBAL\ConnectionException $e) {
    return Response::json(['reason' => 'The Database server is not responding', 'links' => [['rel' => 'self', 'href' => URL::full()]]], 500);
});
Пример #22
0
function hsa($item)
{
    if (is_array($item)) {
        foreach ($item as $it) {
            if (URL::to($it) == URL::full()) {
                return 'nav-active active';
            } else {
                return '';
            }
        }
    } else {
        if (URL::to($item) == URL::full()) {
            return 'nav-active active';
        } else {
            return '';
        }
    }
}
Пример #23
0
 public function editAction()
 {
     $form = new StockForm();
     $keyValue = Input::get($this->key);
     $object = Stock::findOrFail($keyValue);
     $url = URL::full();
     $FieldsnameHelper = Stock::$FieldsName;
     if ($form->isPosted()) {
         $xi = 0;
         if ($form->isValidForEdit($xi)) {
             $object->{$FieldsnameHelper}['1'] = Input::get($this->FieldsEdit['1']['name'] . $xi);
             $object->{$FieldsnameHelper}['3'] = Input::get($this->FieldsEdit['3']['name'] . $xi);
             $object->{$FieldsnameHelper}['5'] = Input::get($this->FieldsEdit['5']['name'] . $xi);
             $object->{$FieldsnameHelper}['6'] = Input::get($this->FieldsEdit['6']['name'] . $xi);
             $object->{$FieldsnameHelper}['7'] = Input::get($this->FieldsEdit['7']['name'] . $xi);
             $object->save();
             return Redirect::route($this->routeIndex);
         }
         return Redirect::to($url)->withInput(["key" => Input::get($this->key), "object" => $object, "errors" => $form->getErrors(), "url" => $url]);
     }
     return View::make($this->routeEdit, ["form" => $form, "object" => $object, "FieldsEdit" => $this->FieldsEdit, "module" => $this->module, "key" => $this->key, "productoCombo" => $this->productoCombo]);
 }
 /**
  * list
  */
 public function action_list()
 {
     // create model
     $model = ORM::factory($this->_settings->get('model'));
     // sortable
     $model->sortable($this->_settings->get('list.sortable'));
     // filter website
     $model->filter('website_id', $this->_website);
     // raise event
     Event::raise($this, Event::BEFORE_LIST, array('model' => $model));
     // sorting
     $this->sort($model, $this->_settings->get('list.sort'));
     // filtering
     $this->filter($model);
     //grouping
     if ($this->_settings->get('group')) {
         // create a group and feed it the current search results (so without paginanation and grouping)
         $group = ORM::factory('Group')->filter('website_id', $this->_website)->filter('module_id', $this->_controller)->grouped($model->items());
         // do group filtering
         $this->group($model);
     }
     // pagination
     $this->pagination($model, $this->_settings->get('list.pagination'));
     // get list
     $data = $model->items();
     // raise event
     Event::raise($this, Event::AFTER_LIST, array('model' => $model, 'data' => &$data));
     // create viewer
     $viewer = Viewer::factory('List', $data);
     // add group to viewer
     if ($this->_settings->get('group')) {
         $viewer->group($group);
     }
     // set data on viewer
     $viewer->settings($this->_settings->get('list'));
     $viewer->route($this->_settings->get('route', FALSE));
     $viewer->controller($this->_controller);
     $viewer->acl(Acl::instance());
     $viewer->state($this->_state);
     $viewer->task($this->request->param('task', FALSE));
     $viewer->callback($this->request->param('callback', FALSE));
     // create view
     $view = View::factory($this->_settings->get('view.list'), array('viewer' => $viewer));
     // raise event
     Event::raise($this, Event::BEFORE_LIST_RENDER, array('data' => $data, 'model' => $model, 'viewer' => $viewer, 'view' => $view));
     // response
     $this->response->body($view->render());
     // set back url globally
     State::instance()->set('url.back', URL::full());
 }
Пример #25
0
<div class="clearfix20"></div>

<?php 
$link = URL::full();
$socialID = uniqid();
?>

<a rel="nofollow" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php 
echo $link;
?>
">
    <img class="opc-hover" src="<?php 
echo res('assets/img/socicons/share_fb.png');
?>
"  alt="" />
</a>
<a rel="nofollow" target="_blank" href="http://www.odnoklassniki.ru/dk?st.cmd=anonymMain&st.redirect=%2Fdk%3Fst.cmd%3DuserStatuses%26amp%3Bst.disp.type%3Dlinks%26amp%3Bst.layer.cmd%3DPopLayerAddSharedResourceOuter%26amp%3Bst.layer.s%3D1%26amp%3Bst.layer._surl%3D<?php 
echo $link;
?>
">
    <img class="opc-hover" src="<?php 
echo res('assets/img/socicons/share_odno.png');
?>
"  alt="" />
</a>
<a rel="nofollow" target="_blank" href="http://vkontakte.ru/share.php?url=<?php 
echo $link;
?>
">
    <img class="opc-hover" src="<?php 
echo res('assets/img/socicons/share_vk.png');
Пример #26
0
|   }));
|
*/
Route::filter('before', function () {
    // Do stuff before every request to your application...
    if (Config::get('application.maint') == true && !Request::route()->is('maint') && !Request::route()->is('reports') && !Request::route()->is('admin') && !Request::route()->is('superadmin') && !Request::route()->is('signin') && !Request::route()->is('signout') && !Request::route()->is('account') && (!Auth::officer() || !Auth::officer()->is_role_or_higher(Officer::ROLE_ADMIN))) {
        return Redirect::to('/maint');
    }
    if (Auth::user() && Auth::user()->banned_at) {
        Auth::logout();
        return Redirect::to('/')->with('errors', array(__("r.flashes.account_banned")));
    }
});
Route::filter('after', function ($response) {
    // Do stuff after every request to your application...
    $response->header('X-XHR-Current-Location', URL::full());
});
Route::filter('csrf', function () {
    if (Request::forged()) {
        return Response::error('500');
    }
});
Route::filter('auth', function () {
    if (Auth::guest()) {
        return Redirect::to('signin');
    }
});
Route::filter('no_auth', function () {
    if (Auth::user()) {
        return Redirect::to('/');
    }
Пример #27
0
/*
|--------------------------------------------------------------------------
| 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.
|
*/
// Trang chủ
Route::get('/', function () {
    return view('base');
});
Route::get('url/full', function () {
    return URL::full();
});
// Xem bảng xếp hạng các trường DH theo điểm thấp nhất của các khoa trong trường
Route::post('/', ['uses' => 'SearchController@getUniversityChart']);
Route::get('home', 'UserController@getTrangChu');
Route::get('xem-dt', function () {
    return view('home/xemdt');
});
Route::get('tra-diem', ['as' => 'tra-diem', 'uses' => 'UserController@getTraDiem']);
Route::post('tim-truong', ['as' => 'tim-truong', 'uses' => 'StudentController@postTimTruong']);
Route::get('liet-ke-nganh', ['as' => 'liet-ke-nganh', 'uses' => 'StudentController@getLietKeNganh']);
Route::get('dang-ky', ['as' => 'dang-ky', 'middleware' => ['auth', 'permissions.required'], 'permissions' => ['student'], 'uses' => 'StudentController@getDangKy']);
Route::get('/login', 'UserController@getLogin');
Route::post('/login', 'UserController@postLogin');
Route::get('/logout', 'UserController@getLogout');
Route::get('/doi-mat-khau', ['middleware' => ['auth', 'permissions.required'], 'permissions' => ['admin', 'clusterstaffmanager', 'clusterstaff', 'universitystaff', 'student'], 'uses' => 'UserController@getchangePasswd']);
 public function editAction()
 {
     // create a new model instance
     ////////////////////////////////////////////////////////////
     $xi = 0;
     //if(Input::has('index')) {
     //	$xi = Input::get("index");
     //}
     /////////////////////////////////////////////////////////////
     $Objnew = new Producto();
     $keyValue = Input::get($this->key);
     $object = Producto::findOrFail($keyValue);
     $url = URL::full();
     //$FieldsnameHelper = $this->FieldsName;
     if (Input::get($this->FieldsEdit['6']['name'] . $xi) == true) {
         //disponible
         $disponiblechk = Input::get($this->FieldsEdit['6']['name'] . $xi);
     } else {
         $disponiblechk = false;
     }
     if ($Objnew->isPosted()) {
         $i = 0;
         $new = Input::all();
         if ($object->validate($i, $new, 2)) {
             $object[$object::$FieldsName[Producto::$FieldsOrderEdit['2']]] = Input::get($this->FieldsEdit['2']['name'] . $xi);
             $object[$object::$FieldsName[Producto::$FieldsOrderEdit['3']]] = Input::get($this->FieldsEdit['3']['name'] . $xi);
             $object[$object::$FieldsName[Producto::$FieldsOrderEdit['4']]] = Input::get($this->FieldsEdit['4']['name'] . $xi);
             $object[$object::$FieldsName[Producto::$FieldsOrderEdit['5']]] = Input::get($this->FieldsEdit['5']['name'] . $xi);
             $object[$object::$FieldsName[Producto::$FieldsOrderEdit['6']]] = $disponiblechk;
             //die(var_dump($object));
             $object->save();
             //die(var_dump($object));
             return Redirect::route($this->routeIndex);
         }
         return Redirect::to($url)->withInput(["key" => Input::get($this->key), "object" => $object, "errors" => $Objnew->getErrors(), "url" => $url]);
     }
     return View::make($this->routeEdit, ["form" => $Objnew, "object" => $object, "FieldsEdit" => $this->FieldsEdit, "module" => $this->module, "key" => $this->key, "routes" => $this->rutasValidas]);
 }
Пример #29
0
 public function editAction()
 {
     $keyValue = Input::get($this->key);
     $object = Compra::findOrFail($keyValue);
     $url = URL::full();
     $FieldsnameHelper = Compra::$FieldsName;
     if ($form->isPosted()) {
         $xi = 0;
         if ($form->isValidForEdit($xi)) {
             $object->{$FieldsnameHelper}[Compra::$FieldsOrderCreate['1']] = Input::get($this->FieldsEdit['1']['name'] . "0");
             $object->{$FieldsnameHelper}[Compra::$FieldsOrderCreate['2']] = Input::get($this->FieldsEdit['2']['name'] . $xi);
             $object->{$FieldsnameHelper}[Compra::$FieldsOrderCreate['3']] = Input::get($this->FieldsEdit['3']['name'] . $xi);
             $object->{$FieldsnameHelper}[Compra::$FieldsOrderCreate['4']] = Input::get($this->FieldsEdit['4']['name'] . $xi);
             $object->{$FieldsnameHelper}[Compra::$FieldsOrderCreate['5']] = Input::get($this->FieldsEdit['5']['name'] . $xi);
             $object->{$FieldsnameHelper}[Compra::$FieldsOrderCreate['6']] = Input::get($this->FieldsEdit['6']['name'] . $xi);
             $object->{$FieldsnameHelper}[Compra::$FieldsOrderCreate['7']] = Input::get($this->FieldsEdit['7']['name'] . "0");
             $object->save();
             return Redirect::route($this->routeIndex);
         }
         return Redirect::to($url)->withInput(["key" => Input::get($this->key), "object" => $object, "errors" => $form->getErrors(), "url" => $url]);
     }
     return View::make($this->routeEdit, ["object" => $object, "FieldsEdit" => $this->FieldsEdit, "module" => $this->module, "key" => $this->key, "proveedoresCombo" => $this->proveedoresCombo, "productoCombo" => $this->productoCombo, "unidadEmpaqueCombo" => $this->unidadEmpaqueCombo]);
 }
Пример #30
0
/*
|--------------------------------------------------------------------------
| 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 Closure to execute when that URI is requested.
|
*/
Route::get('/', function () {
    return View::make('home');
});
Route::get('/url/actual', function () {
    return URL::current() . '   ' . URL::full();
});
Route::filter('cumpleanos', 'filtroCumpleanos');
// Route::get('/', array(
// 	'before'=>'cumpleanos',
// 	function ()
// 	{
// 		return View::make('hello');
// 	}
// ));
Route::get('example', function () {
    return View::make('ejemplo');
});
Route::get('mi/pagina', function () {
    return '¡Hola mundo!';
});