#### Category : laravel-5.8

I make many database applications, in my database have the same table name and the same file. how can i display all the data this is my model this ins my model users class Users extends Model { // protected $connection = ‘mysql4’; protected$table = (‘ilkom_akbar.table_users’); protected $primaryKey = ‘ID’; protected$fillable = [‘ID’,’user_login’,’user_pass’,’user_nicename’, ..

Hey m trying to use The client credentials grant for machine-to-machine authentication. i followed all the steps here but that all wt m getting { "error": "unsupported_grant_type", "error_description": "The authorization grant type is not supported by the authorization server.", "hint": "Check that all required parameters have been provided", "message": "The authorization grant type is not ..

I’m trying to send a rich text e-mail in my Laravel 5.8 app. The issue is that I want to concat an user’s content part into the view, which is also HTML(from a rich text editor). This is the body of the e-mail that is being delivered: This the view: <!doctype html> <html> <head> <meta ..

I´m trating to use my new serviceProvider into mail.php because i need get values from database not .env i can show one solution in this site that one person creaed a serviceProvider and get all data that he needed. My question is, how i can use this provider into mail.php? my provider: public function register() ..

I have a laravel project in a directory labelled demo inside my public_html, how do I configure the redirect to /public for all requests? Sourc..

i have a laravel application that sends email and sms through Notification, but a page was created with a form, where it would be necessary to get the email from the form’s input to send the information my controller public function store(Request $request) {$request->validate([ ‘responsible_service’ => ‘required’, ‘company’ => ‘required’, ‘responsible_company’ => ‘required’, ‘responsible_contact’ ..

<?php namespace AppHttpControllers; use IlluminateHttpRequest; class HomeController extends Controller { protected $layout = ‘layouts.master’; public function dashboard(){$this->layout->content = view(‘dashboard.index’)->withTitle(‘Dashboard’); } } sorry, here I followed the tutorial in laravel 4 and I implemented it at level 5.8 (with references in the document laravel 5.8). in implementation, I get the error message "Attempt to assign ..

When trying to format date with laravel accessor everything works fine. public function getDueDateAttribute($value) { return Carbon::parse($value)->format(‘d-m-Y’); } But when I use Laravel Voyager BREAD Browse accessor public function getDueDateBrowseAttribute($value) { return Carbon::parse($value)->format(‘d-m-Y’); } I get the following error: ErrorException(code: 0): Data missing at vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:594 Sourc..

I have database table structure like : ClassRoom id (int) PK name (varchar) ClassTeacherCourse id (int) PK id_classroom (int) FK id_teacher (int) FK id_course (int) FK Course id (int) PK course_name (varchar) Teacher id (int) PK teacher_name (varchar) So far I have code just to call ClassRoom table & ClassTeacherCourse, like : $class = Class::where(‘id_teacher’, .. Read more My query is not properly working; this query only gets data from one table. However, I should be able to take data from both tables. I’m using the pluck() method.$this->projectcosts = ProjectCost::where(‘project_id’, $id) ->get()->pluck(‘costItems’)->toArray(); Sourc.. Read more$this->projectcosts = ProjectCost::where(‘project_id’, $id)->get()->pluck(‘costItems’)->toArray(); Sourc.. Read more Hi I try to figure out why I always get this error? I’m always get creating default object from empty value. I just want to make edit section to edit and update the user. But when I click Update button, this error is shown. The error is highlighted at public function update(Request$request) part. This ..

I have post and category many to many relationship where post and category model define correctly, I have pivot table to but no model for pivot table. When I get one post I have the post categories to, $post->categories. I want to list all post with current post categories, for exapmle if the current post .. Read more command: composer require laravel/scout -W error: Using version ^8.4 for laravel/scout ./composer.json has been updated Running composer update laravel/scout –with-all-dependencies Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 – Root composer.json requires laravel/framework 8.2.*, found laravel/framework[v8.2.0] but it conflicts with another .. Read more I want to add search engine on my website and I want to use elasticSearch. I’m using it for my first time and it gives me this error "error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: my code looks like this: web.php use AppPosts; Route::get(‘/elasticSearch’, function(){ Posts::createIndex($shards = null, $replicas = null); Posts::putMapping($ignoreConflicts = true); Posts::addAllToIndex(); }); ..

HTML Code @foreach($posts as$post) <div class="container card mt-2" style="width: 32rem;"> <img src="{{ asset(‘images’)."/".$post->img_url }}" class="card-img-top" alt="img not found"> <div class="card-body"> <h5 class="card-title">{{$post->champion }} </h5> <p class="card-text">{{ \$post->owner_user->username }}</p> </div> </div> @endforeach Laravel code public function testpage() { return Posts::with([‘OwnerUser’,’like’])->get(); } when I just return Posts table, it has column owner_user with user information ..

i know this has been asked alot , but none of the solution works for me as i want to use this in the view i have 3 tables Languages : id , title Blog : id BlogLanguage : blog_id , language_id , title , text so when i list the blogs in the view ..

i know this has been asked alot , but none of the solution works for me as i want to use this in the view i have 3 tables Languages : id , title Blog : id BlogLanguage : blog_id , language_id , title , text so when i list the blogs in the view ..

I hope everyone is well and safe! I have a question regarding ADLDAP Connections in laravel, the config file for it and saving the settings in the webapps database. I am using the ADLDAP Laravel plugin. So, Let me start from the beginning. Firstly, I have a webapp built in VueJS which uses a Laravel ..

I’m using the Intervention Image package for manipulating the uploaded image before saving it to the server. I have successfully set the dimension of the image, and it’s working fine, but I want to fix the image size, i.e., the image generated should be less than equals to 30KB and should have a resolution of ..

I’m in Laravel 5.8 in Windows trying to create an inbound API route. Postman always gives me a 404 when I try to hit this route: http://MYHOSTISHERE/api/v1?event=NewDealerSetUp&api_key=MYKEYISHERE CURL with curl -X POST "http://rx-0-unicorn.local/api/v1?event=NewDealerSetUp&api_key=MYAPIKEYHERE" also gives me a 404. Can someone point me to what I’m doing wrong? I’m bald but I may start pulling out ..