Skip to content

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 rout…

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 …

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 vari…