php-laravel - Several php laravel issues
PHPz
PHPz 2017-05-16 16:55:16
0
2
718

1.

abort(404, 'Unauthorized action.');

An error will be thrown, showing404.blade.phpview file. How should I outputUnauthorized action.?

in this view file?

2.
How to get the name of the currently executed controller and method?
Use
echo Route::currentRouteAction();# in the controller

##The result is an error:


3.
Route::controllers(['test' => 'TestController']);

Do I have to set the get/post/etc. method for each method in the controller to set the routing in this way?

4.

The url will be output, but I am using https, how should I set it up?

5.Where to put the custom function? See what is written in this article.
composer dump-autoload, maybe sometimes there is only FRP but no SSH permissions. What else? Any solution?http://laravel.so/tricks/e81a15277236d35feb19ad5b86427bdc

PHPz
PHPz

学习是最好的投资!

reply all (2)
过去多啦不再A梦
  1. Please see http://laravel.so/tricks/9024b7536d8275d9eba8b4b945840c03

  2. Please see http://overtrue.me/articles/2015/03/get-current-controller-of-laravel.html

  3. is

  4. asset()Helper function

    巴扎黑
    1. The upstairs looks nice

    2. use Route;

    3. Yeah

    4. Upstairs

    Finally, if you are interested, you can check out the series of videos I recently recorded on Laravel 5.1

    https://laravist.com/series/laravel-5-basic

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!