What's New in Laravel v8.61

The Laravel team released 8.61 with a delete or fail() model method, a value or fail model method, assert if a model exists in a test and the latest changes in the v8.x branch.

Delete or Fail Model Method

Claas Augner contributed a deleteOrFail() method that makes it more convenient to handle model delete errors and less verbose than checking the return value of delete():

1try {2    $model->deleteOrFail();3} catch (\Throwable $e) {4    // ...5}

Assert If a Model Exists Test Method

@RVxLab contributed a assertModelExists() testing method to test whether a model exists in the database. Taylor Otwell also added a assertModelMissing method:

 1$product = Product::find(1); 2  3// ... 4$this->assertDatabaseHas('products', [ 5    'id' => $product->getKey(), 6]); 7  8$this->assertModelExists($product); 9 10$this->assertModelMissing($product);

Value or Fail Model Method

In the only new feature of Laravel 8.60, @Italo contributed a valueOrFail() method, which gets a single column's value from the first result of a query or throws an exception:

1// Before:2$votes = User::where('name', 'John')->firstOrFail('votes')->votes;3 4// Now:5$votes = User::where('name', 'John')->valueOrFail('votes');

Allows Tests to Utilize the Null Logger

Tim MacDonald contributed a new update where tests can utilize the null logger. Check out Pull Request #38785 for more details on the situation and updates made.

Create a Policy While Creating a Model

Tim Fevens contributed a --policy flag, which is also included with the --all flag as well:

1php artisan make:model --policy Post

Release Notes

You can see the complete list of new features and updates below and the diff between 8.59.0 and 8.61.0 on GitHub. The following release notes are directly from the changelog:



  • Added possibility compare custom date/immutable_date using date comparison (#38720)
  • Added policy option to make:model (#38725
  • Allow tests to utilise the null logger (#38785)
  • Added deleteOrFail to Model (#38784)
  • Added assertExists testing method (#38766)
  • Added forwardDecoratedCallTo to Illuminate/Database/Eloquent/Relations/Relation (#38800)
  • Adding support for using a different Redis DB in a Sentinel setup (#38764)


  • Return on null in Illuminate/Queue/Queue::getJobBackoff() (27bcf13)
  • Provide psr/simple-cache-implementation (#38767)
  • Use lowercase for hmac hash algorithm (#38787)



  • Added the valueOfFail() Eloquent builder method (#38707)


#laravel #php #webdev 

What is GEEK

Buddha Community

What's New in Laravel v8.61

I am Developer


Laravel 8 New Features | Release Notes - Tuts Make

In this post, i will show you what’s new in laravel 8 version.

#What’s new in Laravel 8?

  • 1 - Change Path Of Default Models Directory
  • 2 - Removed Controllers Namespace Prefix
  • 3 - Enhancements on php artisan serve
  • 4 - Enhanced Rate Limiting
  • 5 - Enhanced on Route Caching
  • 6 - Update on Pagination Design
  • 8 - Dynamic Blade Componenets
  • 7 - Update Syntax for Closure Based Event Listeners
  • 8 - Queueable Model Event Listeners
  • 9 - Maintenance mode: secret access
  • 10 - Maintenance mode: pre-rendered page
  • 11 - Queued job batching
  • 12 - Queue backoff()
  • 13 - Laravel Factory


#laravel 8 features #laravel 8 release date #laravel 8 tutorial #news - laravel 8 new features #what's new in laravel 8 #laravel 8 release notes

Seamus  Quitzon

Seamus Quitzon


Php how to delete multiple rows through checkbox using ajax in laravel

First thing, we will need a table and i am creating products table for this example. So run the following query to create table.

CREATE TABLE `products` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
 `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` datetime DEFAULT NULL,

Next, we will need to insert some dummy records in this table that will be deleted.

INSERT INTO `products` (`name`, `description`) VALUES

('Test product 1', 'Product description example1'),

('Test product 2', 'Product description example2'),

('Test product 3', 'Product description example3'),

('Test product 4', 'Product description example4'),

('Test product 5', 'Product description example5');

Now we are redy to create a model corresponding to this products table. Here we will create Product model. So let’s create a model file Product.php file under app directory and put the code below.


namespace App;

use Illuminate\Database\Eloquent\Model;

class Product extends Model
    protected $fillable = [

Step 2: Create Route

Now, in this second step we will create some routes to handle the request for this example. So opeen routes/web.php file and copy the routes as given below.


Route::get('product', 'ProductController@index');
Route::delete('product/{id}', ['as'=>'product.destroy','uses'=>'ProductController@destroy']);
Route::delete('delete-multiple-product', ['as'=>'product.multiple-delete','uses'=>'ProductController@deleteMultiple']);

#laravel #delete multiple rows in laravel using ajax #laravel ajax delete #laravel ajax multiple checkbox delete #laravel delete multiple rows #laravel delete records using ajax #laravel multiple checkbox delete rows #laravel multiple delete

Juned Ghanchi


Laravel App Development Company in India, Hire Laravel Developers

Hire our expert team of Laravel app developers for flexible PHP applications across various cloud service providers.

With this easy build technology, we develop feature-rich apps that make your complex business process a lot easier. Our apps are,

  • More secure and scalable.
  • A good framework lets you manage and organize resources better.
  • And have a rich community base.

Get your business a best in classlaravel app. Hire laravel app developers in India. We have the best organizational set-up to provide you the most advanced app development services.

#laravel app development company india #hire laravel developers india #laravel app development company #hire laravel developers #laravel development agency #laravel app programmers

sophia tondon

sophia tondon


Top Laravel Development Company India | Laravel Development Services

Laravel is a popular framework for website development, acquiring 25.85% of the PHP framework market share. As a most admired framework among PHP frameworks, it is being utilized for e-commerce, enterprise, social media, and various different types of websites.

There are more than 1 million websites worldwide available over the web that are created using Laravel. Laravel framework is the first preference of PHP developers as it allows them to develop highly scalable, flexible, and faster web applications.

Surely, you, too, would want to deliver a splendid and unhindered user experience to your target audience over the web. Laravel framework can help you achieve this pursuit at ease; all you need to do is hire Laravel developers from reliable & coveted hosts. But! There is no shortage of Laravel development companies that promise to deliver an excellent solution, but only some are able to deliver top-notch quality.

Therefore, I have decided to enlist top Laravel development companies to help you find a reliable and expert host for web development. So, stay hooked with me till the end of this article and explore the best Laravel developers in 2021.

While creating this list, I have kept the following pointers in reflection:

Years of excellence (average 8 years)
Rewards & Recognition
Client rating & feedback
Hourly/Monthly Price
Number of happy clients
Number of successfully launched projects
Minimum man-years experience
So, let’s not waste a minute and glance at top Laravel development companies to hire for creating excellent web solutions.

Read More - https://www.valuecoders.com/blog/technology-and-apps/top-laravel-development-companies-to-hire-experts/

#hire a laravel developer #hire laravel developer #hire laravel developers #laravel developer for hire #laravel developers #laravel developers for hire

sophia tondon

sophia tondon


Hire Laravel Developers | Laravel Development Company, Services India

Looking for a team of experienced offshore Laravel developers? Hire a top dedicated team of Laravel developers from India online with 6+ years of average experience on an hourly or dedicated (monthly) basis from ValueCoders and enjoy easy hiring, quality work, and on-demand scalability at up to 60% less cost.

Our offshore Laravel development experts are fully competent to build scalable, secure, and robust custom web apps suiting your business requirements.

First Time Right Process
Complete Control Over The Team
Certified Laravel Coders
Agile & DevOps Enablement
Non-Disclosure Agreement
No Contract Lock-Ins

Visit Us- https://www.valuecoders.com/hire-developers/hire-laravel-developers

#hire a laravel developer #hire laravel developer #laravel development #hire laravel experts #find laravel developers #laravel development services india