Skip to content
Advertisement

Tag: laravel

How to redirect to specific URL?

I have a route for tenants name like that: And I want to make the default of my domain start with the word “site”: My code: The problem that I’m facing with this code now is when I open the domain it redirects me to tenantName route, not to the home page that I made! How can spreate the route

Trying to get property name and id of laravel payload

I have this JSON payload below and want to get names and ids from the payload. However, l cannot object names and ids from the payload. Decode JSON Api json payloads Answer Use json_decode to decode the json to an associative array, then access the elements of the array as you would any other assoc array. It looks as though

Bigcommerce cart 422: Missing required fields error

I’m using Laravel to consume the Bigcommerce V3 API. I have ben able to succesfully create a new cart. But when trying to add an item to it, I keep getting a 422: Missing required fields error. I’m making my request trough Guzzle like this: The product I’m trying to add has no options or modifiers, so I don’t understand

Getting a substr of a {{ var }} in php

I am populating a HTML table: This yields: 61 event 40012345 substr( 40012345, 0, 24) 60 event 4001234 substr( event has a very long description. The list should show a 25 char substring., 0, 24) Thanks…Dan’l Answer Reorganize your html/php: You can also use Laravel Helpers for string related variables. Read docs here.

Advertisement