laravel-4

Laravel: Get the name of the view that called the controller method

廉价感情. 提交于 2020-11-29 19:10:26
问题 In laravel is it possible to get the name of the view that called the controller method that you're currently in? I have two version of a form in my site. One is meant to be used "outside" of the site (i.e. the user is not logged in) and the other is meant to be used "inside" of the site. The forms differ a bit in presentation, but they hold all of the same fields and call the same store method. Is there a way from within my store method to get the name of the view that called the method? I

Laravel: Get the name of the view that called the controller method

99封情书 提交于 2020-11-29 19:10:08
问题 In laravel is it possible to get the name of the view that called the controller method that you're currently in? I have two version of a form in my site. One is meant to be used "outside" of the site (i.e. the user is not logged in) and the other is meant to be used "inside" of the site. The forms differ a bit in presentation, but they hold all of the same fields and call the same store method. Is there a way from within my store method to get the name of the view that called the method? I

Using HTML Placeholder in Laravel 4

百般思念 提交于 2020-11-26 07:26:38
问题 {{ Form::text('username', Input::old('username')) }} This is my code, I want to add Username as placeholder in the text box. I already use bootstrap in the project. I tried to use the example {{ Form::text('username', 'Username', Input::old('username')) }} But it gives a default value which needs to be deleted and then the user has to type his value. I want something like how it shows up on Twitter.com etc. Which gets erased once user types into it. 回答1: {{ Form::text('username', Input::old(

Using HTML Placeholder in Laravel 4

牧云@^-^@ 提交于 2020-11-26 07:19:21
问题 {{ Form::text('username', Input::old('username')) }} This is my code, I want to add Username as placeholder in the text box. I already use bootstrap in the project. I tried to use the example {{ Form::text('username', 'Username', Input::old('username')) }} But it gives a default value which needs to be deleted and then the user has to type his value. I want something like how it shows up on Twitter.com etc. Which gets erased once user types into it. 回答1: {{ Form::text('username', Input::old(

Using HTML Placeholder in Laravel 4

时光怂恿深爱的人放手 提交于 2020-11-26 07:18:11
问题 {{ Form::text('username', Input::old('username')) }} This is my code, I want to add Username as placeholder in the text box. I already use bootstrap in the project. I tried to use the example {{ Form::text('username', 'Username', Input::old('username')) }} But it gives a default value which needs to be deleted and then the user has to type his value. I want something like how it shows up on Twitter.com etc. Which gets erased once user types into it. 回答1: {{ Form::text('username', Input::old(