Published in


Define a Route Group Controller in Laravel 8.80

Jan 28, 2022, Originally published at ・2 min read

The Laravel crew launched 8.80 with the power to outline a route group controller, render a string with the Blade compiler, PHPRedis serialization and compression config assist, and the most recent modifications within the v8.x department.

Specify a Route Group Controller

Luke Downing contributed the ability to define a controller for a route group, meaning you don’t have to repeat which controller a route uses if the group uses the same controller:

use App\Http\Controllers\OrderController;Route::controller(OrderController::class)->group(function () {
Route::get('/orders/{id}', 'show');
Route::post('/orders', 'store');

A great thing has been added in Laravel 8.80, which is the use of Route::controller() with Groups to shorten Route, so I want to share it with you so that you may use it in your next projects.

Render a String With Blade

Jason Beggs contributed a Blade::render() a technique that makes use of the Blade compiler to transform a string of Blade templating right into a rendered string:

// Returns 'Hello, TechvBlogs'
Blade::render('Hello, {{ $name }}', ['name' => 'TechvBlogs']);

// Returns 'Foo '
Blade::render('@if($foo) Foo @else Bar @endif', ['foo' => true]);

// It even supports components :)
// Returns 'Hello, TechvBlogs'
Blade::render('<x-test name="TechvBlogs" />');

PHPRedis Serialization and Compression Config Help

Petr Levtonov contributed the power to configure PHPRedis serialization and compression choices as a substitute for needing to overwrite the service supplier or outline a customized driver.

The PR launched the next serialization choices:

  • NONE
  • PHP
  • JSON

These options are now documented in the Redis — Laravel documentation.

Thank you for reading this blog.




We are sharing Blogs that are related to 🌍 Web and 📱 Mobile Applications issues and examples of Development. We are share blogs related to Laravel, PHP, CodeIgniter, HTML, CSS, Bootstrap, Javascript, jQuery, MySQL, MongoDB, Node.js, Vue.js, Nuxt.js.

Recommended from Medium


The Moving Average Ribbon Trading Technique

Private Service Connect to connect privately with Google APIs and Services

Configuring a Python Virtual Environment

REI Network X GoodLuckPandas Formed Strategic Partnership

K’s Volatility Bands — Coding in Python.

The Fibonacci Moving Average. New Trading Horizons in Python.

How Python and Parabolic SAR Improved My Stock Trading

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Smit Pipaliya

Smit Pipaliya

I am Senior Developer at ServerAvatar Technology.

More from Medium

Carbon Add Days To Date In Laravel

How to Clear Cache In Laravel 8

Build Web App Mini Sosmed with Laravel 8 [Part 5][End]

Laravel Basic | Laravel 7/6 Resource Route and Controller Tutorial