What do all the blade options do? - laravel-4

Looking at the laravel blade source code, I see there appear to be a lot of different commands, like #show, #append, or #endunless, that don't appear in the official laravel docs. Can someone give me a list of all the #- options in blade, and what they do?

You could try digging around in the online API docs and see if that yields the answers you're looking for. Possibly some of them are internal methods?
Illuminate\View\Compilers\BladeCompiler

Related

Custom URL for Component Search Results

I am writing to seek help to display custom results in a SEF URL on Joomla CMS.
Example: This is a page with a customized search, https://jobwalkins.in/search.html?search=IT&exf_5=1&exf_4=-1&option=com_jomclassifieds&view=search&Itemid=147
I would like to display this link as https://jobwalkins.in/today-walkins-in-hyderabad.html
I am using https://extensions.joomla.org/extension/jom-classifieds/ as the extensions.
Any helpful inputs will be greatly appreciated. I am looking forward to hearing from you soon.
Best Regards,
Syed H
I was able to get the desired output using https://extensions.joomla.org/extension/sh404sef/. The website in question https://jobwalkins.in/ now shows the predefined search results in custom URLs.
Here are a few of them which I was able to achieve:
https://jobwalkins.in/jobs-in-bangalore.html where the actual link was https://jobwalkins.in/search.html?search=&exf_5=2&exf_4=-1&option=com_jomclassifieds&view=search&Itemid=147
https://jobwalkins.in/today-walkins-in-hyderabad.html where the actual link was https://jobwalkins.in/search.html?search=&exf_5=1&exf_4=-1&option=com_jomclassifieds&view=search&Itemid=147
It works even for the links where the keywords are searched ex:
I searched for a keyword "fresher" and have set the page to render on custom URL https://jobwalkins.in/fresher-jobs.html where the actual link was https://jobwalkins.in/search.html?search=fresher&exf_5=-1&exf_4=-1&option=com_jomclassifieds&view=search&Itemid=147
The sh404SEF https://extensions.joomla.org/extension/sh404sef/ worked great and helped me address my concern very well.
Hope this post is useful for someone who may have a similar issue.

Laravel 4 Blade templates documentation

I'm new to Laravel 4. I don't seem to find adequate documentation on the Blade templating system.
I see some examples at http://laravel.com/docs/templates with no explanation.
Another example at Laravel 4 Controller Templating / Blade - Correct method?
Where are #section, #yield, #show, etc defined and documented? Where is the Blade templating system actually explained?
Or is it so new, or so "intuitive", that it needs no explanation? Or I could use another templating system that is better documented?
I would say Blade is so easy that it doesn’t need documentation.
Follow this link great tutorial by Jeffrey Way which will take you through everything you need to know.
https://tutsplus.com/lesson/templating-changes/
I am totally convinced that the original documentation about has many areas of opportunity. Anyway, Dayle Rees has done an excellent job through the pages of Code Bright. The Blade section of the book has some great examples that perfectly complement the original documentation. I find it strange that wasn't previously mentioned. You should give it a look.
Regards!
The documentation for Blade isn't in the laravel.com docs. No, they tucked it away in their readthedocs.io account:
https://laravel-guide.readthedocs.io/en/latest/blade/

Blade templating engine syntax issues on Laravel 4

I'm currently starting a project on the beta version of Laravel 4
When i try to use the templating engine some tags work and some doesn't. e.g:
#layout('layouts.master')
#section('container')
<h1>About US</h1>
#endsection
is displayed as:
#layout('layouts.master')
About US
#endsection
which means that the #section tag is parsed, but the other are referred to as plain text.
also if i change the #layout to #include, it does include the template.
Has anyone run into a similar issue? Have there been any syntax changes I'm unaware of?
#layout has been changed to #extends in Laravel 4. Also, #endsection has been changed to #stop
The source of the problem is that a lot of tutorials online (youtube and blogs) still use the #layout and #endsection. And these tutorials usually claim to be Laravel4 tutorials as well.
So a lot of people fall in to this little trap starting their first Laravel4 app.
Tip: I use this guy's cheat sheet page while developing (propers to Jesse O'Brien). It's how I found out myself I was using outdated blade tags.
If you come across problems with Laravel or in case you don't know if Laravel has built in a functionality you'd need, allways check out the docs for the Laravel version you use.
The online documentation of the current released version (4 at the time of writing): http://laravel.com/docs/
and the Laravel API to dive into the source online with explanation of e.g. function arguments: http://laravel.com/api/

Getting started with Phil Sturgeon's CodeIgniter Template library

I'm trying to use Phil Sturgeon's CodeIgniter Template library, but I can't get it to change my pages. I read the documentation, followed the steps there,
Download
Copy to application folder
Create a views/layouts/default view
(Auto)load the library
however, it is not clear as to how the template is actually implemented. I thought that loading the view would apply the template everywhere, but it doesn't seem to work that way. I've also read about it in the CodeIgniter Wiki, but it looked too complicated to be the right answer.
How are you supposed to use Phil Sturgeon's Template with your controllers? (or views?) Am I missing something here?
It does not overload the load->view() methods, that would be bad. You need to update your controllers to use the template's syntax and methods in every instance you want to use it:
http://philsturgeon.co.uk/demos/codeigniter-template/user_guide/
You will use $this->template->build() instead of $this->load->view() in most cases, after constructing your template by defining regions, setting titles, etc.
There should have been a user guide included in your download with examples.

CodeIgniter Help

I am trying to build an autosuggest using CodeIgniter, can i have some examples?
Try their video tutorials. They show you how to make a blog and a basic introduction to CodeIgniter.
Also, they have another list of tutorials that might give you a better idea.
Have a look at the PHP form_helper that shows you how to add javascript events and PHP callbacks on to form elements both of these you will need to use to work.
Good Luck

Resources