Laravel storage cant force download files
I want to let user to download some file from storage path. In this case will be some backups they have made. So i have a method can create backups and show on vue js table. And now i am…
I want to let user to download some file from storage path. In this case will be some backups they have made. So i have a method can create backups and show on vue js table. And now i am…
In a tutorial on Laravel (*1) it is said that the controller name should be plural instead of singular. I am surprised because Laravel always generates the controller automatically in singular. There was also the question in 2018 in the…
I want to get previous and next news order by date. The code below works fine if there is only one news a day. But cannot handle multiple news on the same day. NewsController.php public function detail($slug){ $news = AppNews::active()->where('slug',…
I want to get closest date from $search_date if is not same values in $array['date']. If is same value in $array['date'] I want all array. Format date is 'Y-m-d'. Example 1: $search_date = '2022-12-08'; $array = [{"price":"200","date":"2022-12-12"},{"price":"50","date":"2022-12-10"},{"price":"100","date":"2022-12-10"}] Return should be:…
If I have two inputs like the following <input type="text" name="id"> <input type="text" name="name"> Then it is possible to get values in array on backend like this array("id"=>"name") If it is possible then how it can be done?
In Book model I have 2 methods 1 for get book list another for get auth user Favourites book list. Two methods like below For get book list : public function getBooks($id = null) { $query = $this::with("bookImages","author","category")->withCount(['favourites'])->orderBy('created_at', 'desc'); return…
I am using ckeditor in laravel 8. But can not show data in ckeditor From Ajax. Here is my Ajax Code. $('.edit').on('click', function() { var id = $(this).data('id'); $.ajax({ type: "POST", url: 'support-ticket-by-id', data: { id: id }, dataType: 'json',…
I'm trying to learn Laravel, but ran into an issue I hope you can help resolve. Recently, while working to learn php programming I installed XAMPP, without problem and used it with both php and MYSql. It uses the localhost…
I want add PHP-code as text in laravel blade. (Something like adding code in stackoverflow) in blade file I have: {!! nl2br($article->body_ru) !!} in $article->body_ru I'm add huijlhgfyuhukik rfthkgjb ftygyjh <code> <?php namespace AppServices; use IlluminateSupportFacadesApp; use IlluminateSupportCollection; use stdClass;…
first of all im new to laravel, second i cloned a project from GitHub I'm trying to start my laravel development server with| php artisan serve but it gives me this error: php artisan serve Starting Laravel development server: http://127.0.0.1:8000…