‹ முகப்புக்கு திரும்ப

Laravel 13 Routing முழு Guide: Routes, Parameters, Groups, Named Routes, Route Model Binding & Resource Controllers

Laravel 13 routing-ஐ அடிப்படையிலிருந்து advanced வரை கற்றுக்கொள்ளுங்கள் — GET/POST/PUT/DELETE routes, required மற்றும் optional parameters, middleware-உடன் route groups, named routes, implicit மற்றும் explicit route model binding, resource controllers, fallback routes, rate limiting, signed URLs, மற்றும் production-க்கான route caching. Laravel 13 Mastery series-ன் Part 2.

Keerthika 6 min read 106
Google-ல் Follow
அப்டேட் 5 மாதங்கள் முன்
Web Dev Laravel 13 Routing முழு Guide: Routes, Parameters, Groups, Named Routes, Route Model Binding & Resource Controllers 6 நிமிடம் மீதம் Google-ல் Follow
Laravel 13 Routing முழு Guide: Routes, Parameters, Groups, Named Routes, Route Model Binding & Resource Controllers

தமிழ்டெக் AI சுருக்கம்

Laravel 13-ல routing என்பது உங்க application-ன் GPS மாதிரி — browser-ல வரும் ஒவ்வொரு request-ம் முதலில் routes file வழியா controller action-க்கு போகும், இப்போது அது bootstrap/app.php-ல withRouting() மூலம் configure ஆகும், பழைய RouteServiceProvider இல்ல. Basic GET/POST routes, required/optional parameters, named routes, middleware groups, route model binding, resource controllers எல்லாம் இந்த guide cover பண்ணுது; real apps-ல closures விட்டு controller-based routes use பண்ணுங்க, ஏன்னா route caching அப்பதான் work ஆகும். Named routes மூலம் URL-ஐ hardcode பண்ணாதீங்க — route() helper use பண்ணினா URL pattern மாறினாலும் links automatically update ஆகும், அதுதான் maintainability-க்கு முக்கியம். Route model binding Laravel-ன் அழகான feature — {user} மாதிரி parameter-ஐ automatically Eloquent model-ஆ resolve பண்ணும், slug-based SEO URLs-க்கும் {article:slug} custom key binding support பண்ணும். Users தெரிஞ்சுக்கணும் விஷயம்: Route::resource() ஒரு line-ல full CRUD தரும், production-ல php artisan route:cache போடுங்க, API-க்கு rate limiting/throttle apply பண்ணுங்க, fallback route-ல custom 404 handle பண்ணுங்க.

  • Laravel-ல் web.php மற்றும் api.php routes-க்கு என்ன வேறுபாடு?
  • Route model binding என்றால் என்ன?
  • Closures-க்கு பதிலாக controllers ஏன் use பண்ண வேண்டும்?
  • Route caching performance-ஐ எப்படி improve பண்ணும்?

AI உதவியுடன் தயாரான சுருக்கம் — தமிழ்டெக் எடிட்டர்ஸ் சரிபார்த்தது.

Routing — உங்கள் Laravel Application-ன் GPS

முந்தைய article-ல் Laravel 13-ஐ install செய்து நம்முடைய first route-ஐ create செய்தோம். இப்போது deep-ஆ போகலாம். Routing என்பது Laravel-ல் மிக fundamental concept — உங்கள் application-க்கு வரும் ஒவ்வொரு request-ம் routing system வழியாகத்தான் முதலில் pass ஆகும்.

Routing-ஐ ஒரு restaurant menu போல நினைத்துக்கொள்ளுங்கள். Customer (browser) ஏதாவது order பண்ணும்போது (URL), waiter (router) menu-வை check பண்ணி (routes file), சரியான dish-ஐ (controller action) கண்டுபிடித்து serve பண்ணுகிறார். Menu இல்லாமல் waiter-க்கு என்ன serve பண்ணணும்னு தெரியாது.

இந்த article-ன் முடிவில், Laravel offer செய்யும் ஒவ்வொரு routing concept-ம் உங்களுக்கு புரியும் — basic GET routes-லிருந்து advanced route model binding வரை.

Laravel 13-ல் Routes எங்கே இருக்கு?

Laravel 13-ல் (மற்றும் 11+) routing architecture பழைய versions-லிருந்து significantly மாறியது. Routes bootstrap/app.php-ல் configure செய்யப்படுகின்றன:

// bootstrap/app.php
return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        api: __DIR__.'/../routes/api.php',
        commands: __DIR__.'/../routes/console.php',
        health: '/up',
    )
    ->create();

முக்கியமான மாற்றம்: Laravel 10 மற்றும் அதற்கு முந்தைய versions-ல் இருந்த RouteServiceProvider இனி இல்லை. எல்லாமே bootstrap/app.php-ல் withRouting() method-ஐ பயன்படுத்தி configure செய்யப்படுகிறது.

Premium Content

Series-ன் full article-ஐ படிக்க Premium subscribe செய்யுங்கள்.

You've used 3 of 3 free articles today.

Subscribe Now

Already subscribed? Sign in

நாளைய டெக் செய்திகள் உங்க WhatsApp-க்கே

தினமும் ஒரு சின்ன update, இலவசம். TamilTech channel-ஐ follow பண்ணுங்க.

What do you think?

people reacted

Keerthika

தமிழ்டெக் எடிட்டோரியல் டீம் · 3,344 கட்டுரைகள்

Keerthika is an editor at TamilTech, the Tamil and English technology publication founded by Praveen Kumar S. She covers AI, smartphones, gadgets, EVs, startups and cybersecurity i...

மேலும் Keerthika

WhatsApp-ல் TamilTech-ஐக் கேளுங்க

டெக் சந்தேகமா? தமிழிலோ ஆங்கிலத்திலோ கேளுங்க — எங்க WhatsApp அசிஸ்டன்ட் TamilTech கட்டுரைகளில் இருந்து சில நொடிகளில் பதில் சொல்லும்.

தொடர்புடைய செய்திகள்

கருத்துகள் (0)

| Supports **bold**, *italic*, `code`

Be the first to comment!

அடுத்த செய்தி Google: 'பேக் பட்டன் ஹைஜாக்கிங்' தீங்கிழைக்கும் செயல் – ஜூன் 15 முதல் தளங்களின் தரவரிசை குறையலாம்
Tamiltech

Tamiltech

Install app for faster access

Earn XP 🏆
WhatsApp
Notifications