This is simple but I can’t seem to be able to do it with blade and I usually go back to php for this but, since I can’t declare a new php variable with blade (without printing it, that is) how should …
Tag: laravel
Laravel routes aren’t working with 1&1 [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question Many many many topics about this, but I have to say that none are helping me a great deal. I have a website with Laravel
Laravel: Get base URL
Simple question, but the answer seems quite hard to come by. In Codeigniter, I could load the URL helper and then simply do to get my site’s URL. Is there an equivalent in Laravel? Answer You can use the URL facade which lets you do calls to the URL generator So you can do: You can also use the application
Mockery no matching handler for closure
I can’t figure out why I’m getting this error during this test. My test appears to be matching the rest of the code exactly. What am I overlooking? In my test I have: $passwordBroker = m::mock(…
Laravel use same form for create and edit
Am quite new to Laravel and I have to create a form for create and a form for edit. In my form I have quite some jquery ajax posts. Am wondering whether Laravel does provide for an easy way for me to use the same form for my edit and create without having to add tons of logic in my
laravel class not found (works on localhost but not on DO server)
This is a repeat question – eg: Laravel 4 migrations – class not found However, I’ve tried every solution (from every forum I could find) and cannot figure this out. Scenario I created a Laravel 4 project on my local machine – added some classes, controllers, views, etc – the project works great. I then copy this fresh repo onto
Doing HTTP requests FROM Laravel to an external API
What I want is get an object from an API with a HTTP (eg, jQuery’s AJAX) request to an external api. How do I start? I did research on Mr Google but I can’t find anything helping. Im starting to …
Laravel Facades – Passing parameter to __construct()
If I am creating a Facade, and I want to pass parameters before it becomes instantiated, what do I do?
How do I get all of the results from a hasMany() relationship in Laravel?
For example, I have a Product, and I have a BaseProduct. In the model for the Product, I’ve specified the following: In the BaseProduct, I’ve specified the following relationship: If I were to select a product, like so: I could get the BaseProduct by doing the following: Instead of getting the array of the result from that, how would I
How to define a Laravel route with a parameter that contains a slash character
I want to define a route with a parameter that will contain a slash / character like so example.com/view/abc/02 where abc/02 is the parameter. How can I prevent Laravel from reading the slash as a separator for the next route parameter? Because of that I’m getting a 404 not found error now. Answer Add the below catch-all route to the