Support the ongoing development of →

Creazione Url

7 Apr, 2020 1 min read
Esempio: creazione url "https://food.local/it/profile/giacomo/bell_boy/edit", si può creare nei seguenti modi:
partendo dal profilo:
$url = $profile_panel->relatedUrl(['related_name' => 'bell_boy', 'act' => 'index_edit']);
partendo dal bellboy:
$url1 = $bellboy_panel->setParent($profile_panel)->url(['act' => 'index_edit']);
se qualcosa va storto utilizzare
$url = route('',['lang'=>app()->getLocale(),'container0'=>'restaurant', 'item0' => $restaurant])
ps: cosa può andare storto? esempio:
mi trovo dentro l'url https://food.local/it/restaurant_owner/restaurant-owner-3/restaurant/edit (la lista dei miei ristoranti e ordinazioni),
da li vorrei andare in https://food.local/it/restaurant/dallasiatico (uno dei miei ristoranti)
Like this article? Let the author know and give them a clap!

Other articles you might like

modulo contatti

in laravel  <!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale...

Read article

create view

in laravel @extends('layout') @section('content') <style> .container { max-widt...

Read article

controller in laravel vs controller in laraxot

in laravel <?php namespace App\Http\Controllers; use App\Student; use Illuminate\Http\Request...

Read article

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 - All rights reserved.