I have a question that I cant solve at this moment. I have and URL like this: https://www.example.com/schedule/2020-02-26 i put the date on the URL with the next function: In this example $datevar is equal to “2020-02-26” My question is, How can I show the $datevar in my blade? Im trying with {{$d…
Tag: laravel-5.7
Is there a insertUsing with ignore option?
In Laravel there exist two useful methods in DB facade: insertOrIgnore() – allows ignore action when duplicate is being inserted insertUsing() – allows insert data based on data from another tables I need to combine these two approaches i.e. insert data based on existing data and ignore duplicates…
Laravel: How to get count of total Comments of total Posts
I have 10000 posts and each post have many comments. I need to calculate all comments count when i take posts. [ ‘post_1’ => [ ‘comments’ => [ ‘comment_1’ => ‘trst …
Laravel 5.7 unable to load `storage/framework/cache/data` and write into `./storage/logs/laravel-2019-06-11.log`
I have a project under laravel 5.7 installation and for some reason I get the following error: In order to mitigate the error I tried the following: Permission Based tries: artistan based attempts: php-fpm default user settings: Also for the development I use vagrant with the following Vagrantfile located at …
Laravel old method not returning password values
I’m currently learning Laravel and I’m creating a register form. When the form has errors I want to repopulate the input fields with their old values. My form looks like this: For readibility I removed all labels, classes and ids from the input files. It looks like Laravel doesn’t ‘wan…
Interface ‘MonologResettableInterface’ not found when running a new project
Whenever I try to run any command related to php artisan or composer this error shows up: PHP Fatal error: Interface ‘MonologResettableInterface’ not found in pathtoprojectrootvendormonologmonologsrcMonologLogger.php on line 28 I open the file, and it points me to : class Logger implements LoggerI…
How to get client IP address in Laravel 5+
I am trying to get the client’s IP address in Laravel. It is easy to get a client’s IP in PHP by using $_SERVER[“REMOTE_ADDR”]. It is working fine in core PHP, but when I use the same thing in …