laravel 4 form macro: Method fullName does not exist -


i'm confused creation of laravel 4 form macro. create custom form macro did 3 things: 1) app/macros.php

<?php form::macro('f', function() {     return '<p>full name: <input type="text" name="full_name"></p>'; });    

2) app/routes.php

route::get('/f', function(){     return form::f(); )}; 

3) start/global.php

app_path().'/macros.php' 

but when go /hostlocal/f, laravel return "method f not exist." can find problem??

you missed add "require" @ end of /app/start/global.php.

require app_path().'/macros.php'; 

after adding should work.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -