Laravel whereDoesntHave() – multiple OR conditions

You can use doesntHave and specify the boolean operator: $products = Product::doesntHave(‘categories’)->doesntHave(‘countries’, ‘or’)->get(); Actually you only need whereDoesntHave if you want to pass in a closure to filter the related models before checking if any of them exist. In case you want to do that you can pass the closure as third argument: $products = … Read more

Laravel Blade html image

If you use bootstrap, you might use this – <img src=”https://stackoverflow.com/questions/29858097/{{URL::asset(“/image/propic.png’)}}” alt=”profile Pic” height=”200″ width=”200″> note: inside public folder create a new folder named image then put your images there. Using URL::asset() you can directly access to the public folder.

Laravel eloquent multiple WHERE with OR AND OR and LIKE?

Use like and not like with % in where() and orWhere() methods: ->where(‘column’, ‘like’, ‘%pattern%’) https://laravel.com/docs/5.3/queries#where-clauses If you need to use multiple AND do like this: ->where($condition) ->where($anotherCondition) If you want to use OR do this: ->where($condition) ->orWhere($anotherCondition) To combine multiple AND and OR do parameter grouping: ->where(‘name’, ‘=’, ‘John’) ->orWhere(function ($query) { $query->where(‘votes’, ‘>’, … Read more

PHPunit Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration()

It seems like your version installed globally does not meet the minimal required version. Try to run phpunit –version I bet you will get something like 5.1. The php artisan dusk command uses different version which is located in vendor/bin/phpunit. So, you are also able to use this version instead. Just type: vendor/bin/phpunit instead of … Read more

Laravel Pagination is showing weird arrows

Here is official document that talk about it. You can check it Inside AppServiceProvider use Illuminate\Pagination\Paginator; public function boot() { Paginator::useBootstrap(); } Doc: https://laravel.com/docs/8.x/pagination#using-bootstrap Sample implementation: https://www.itsolutionstuff.com/index.php/post/laravel-8-pagination-example-tutorialexample.html

replace password reset mail template with custom template laravel 5.3

Just a heads up: In addition to the previous answer, there are additional steps if you want to modify the notification lines like You are receiving this…, etc. Below is a step-by-step guide. You’ll need to override the default sendPasswordResetNotification method on your User model. Why? Because the lines are pulled from Illuminate\Auth\Notifications\ResetPassword.php. Modifying it … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)