Questions tagged [laravel-5]

Laravel 5 is the current major version of the open-source PHP web development MVC framework created by Taylor Otwell. Laravel helps you create applications using simple, expressive syntax. Use the laravel tag for general Laravel related questions.

0
votes
0answers
7 views

I want to store data from an array and need to store those entities id in another array

I am trying to store data from an array like $locations = "khulna, dhaka" in Laravel. But location shouldn't be duplicate in locations table. Later I need the ID's of those locations (if they are in ...
0
votes
0answers
7 views

How can I render meta tags in html using vue-meta plugin?

I have laravel-vueJS application. I installed vue-meta plugin and declared metaInfo object in vue component as below, metaInfo: { title: 'Default Title', description: 'Default description' }...
0
votes
2answers
17 views

How can show error message in failed login?

I make authentication system using the following command: php artisan make:auth It works fine. But when I try to customize the design and other stuff everything seems messy to me.i.e: When I try ...
0
votes
0answers
10 views

Elastic Search 2.4.6 using Docker

I am using docker to run a Laravel 5.3 project which is using Elastic Search 2.4.6 as a prerequisite, I have tried with 6.4.1 (which is available on docker hub) but unfortunately I got following error:...
1
vote
1answer
29 views

How to define action inside form in laravel?

I simply want to add an action to a form and I am trying as follows: {{ Form::open(['action'=> ['[email protected]'], 'method'=>"POST",'class'=>'login-form']) }} But I am getting the ...
1
vote
1answer
28 views

how to click a button under a nested div using xpath and class in behat3

I have a nested div structure with a button element in it. I want to check the click and redirect functionality on it via behat test cases, But I am not able to test it as error shows up. My page ...
1
vote
1answer
19 views

What is the naming convention of view folder for CamelCase type controller

I have a controller named: CustomAuthController. Now I want to create a folder for this controller. What should I choose for this folder name. I mean what name is the best practice for laravel. is ...
0
votes
1answer
24 views

Laravel collection fetch empty array but sql gives proper results

I want to fetch some result from database and the raw sql query give proper outputs when run in phpmyadmin but laravel give empty array. $transectionDetails=Wallet_transaction::query(); $...
0
votes
0answers
9 views

Call to undefined function Illuminate\Encryption\openssl_cipher_iv_length() - laraval5

I'm building a Laravel application, It worked fine yesterday when I launched the server using php artisan serve --port:8080 Due to some problem with wampserver for other applications I create, I ...
0
votes
2answers
25 views

How to get the absolute path of asset folder?

I have folder named 'auto' inside the assets folder. I am working on running php script. Here I have given absolute path for run.php. My question is how to call assets folder $phpScript = Helpers:...
2
votes
1answer
30 views

Laravel Mix: What's the difference between script() and combine()?

I'm using Laravel for my PHP projects, which is equipped with Webpack through Laravel Mix. I've been using mix.js and mix.script (I know the difference between them). Last week I downloaded a pre-...
-4
votes
0answers
18 views

Reset Password doesnt exist

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel.password_resets' doesn't exist (SQL: delete from password_resets where email = email)
1
vote
2answers
55 views

Use a parameter from URL in a controller Laravel 5.8.22

I'm trying to pass anINT from this URL: myapp.build/courses/anINT (implemented in the CoursesController) to $id in the Lesson_unitsController function below. I've tried a lot of solutions, but I can't ...
0
votes
1answer
44 views

Displaying Eloquent relationships in Laravel

I'm trying to display orders to sellers but also buyers can be able to see their orders. I have created all the necessary relationships and the data is on the database. I'm stuck in trying to query ...
-1
votes
0answers
15 views

Ubuntu Postfix refuses SMTP connection after 12th time of successful connecting and sending email

I am sending emails through Postfix which is acting as a relay server - which is working totally fine. However, I can send maximal 120 emails in 60 seconds. After that I have to wait at least for a ...
0
votes
0answers
39 views

How to query buyer orders from database to their profile

I'm trying to query buyer orders from database to their profile(dashboard), so when a buyer place order he should see the order information in his dashboard. My code isn't working well, how do I fix ...
0
votes
1answer
28 views

Enter date from string to mysql database in laravel

I'm trying to load an excel file which contains dates as strings formatted as dd.mm.YYYY. I want to parse the excel file and save the values into the mysql database. I'm able to do this without an ...
0
votes
3answers
33 views

How to combine two tables with different dates and join on other table?

I am currently trying to perform a query with Laravel / Eloquent but I decided to write the SQL query first in order to figure out what the problem is. I want to group by dates and combine the results ...
1
vote
5answers
52 views

Get User Permissions List

I'm Trying To Get all Permissions User has.. Permission Model public function roles() { return $this->belongsToMany("App\Models\Role"); } Role Model public function users() { return $...
0
votes
1answer
42 views

Update an image in laravel

I want to update user image but it's not getting updated. I tried with $request->hasFile('image') but when I return these statement it always returns false here is my controller if($request-&...
0
votes
0answers
21 views

I got Permission denied error while running composer on ubuntu 16

I installed ubuntu 16 under AWS and try to install laravel 5.8 app, but opening server with ssh -i /home/user/pemkeys.pem command I got Permission denied error while running composer [email protected]
1
vote
1answer
87 views

How to retrieve and display relationship data in Laravel?

I have three tables in the database. orders, products, and order_product table. this is how they look like in my phpmyAdmin https://imgur.com/a/Ud9e2Hh I would like sellers to see orders placed by ...
0
votes
0answers
18 views

Assets not loading in localhost for a laravel app

I have an application which has developed on laravel 5.7 and it's index.php is moved to root directory. Now when i tried to make the server up using php artisan serve command. The website was loading ...
-3
votes
0answers
27 views

Pass file data to label [on hold]

I need when I select file the file name will be replaced with Select file $("#add").click(function() { if ($('#variant').val() == "file") { $("#main").append(' <div class=" field">&...
0
votes
3answers
27 views

Call method of another controller in laravel

I have to call the method of another controller. I use following code to make a call. app('App\Http\Controllers\ApiUserController')->getList(); This is working fine. But I want to try using ...
0
votes
1answer
32 views

Eloquent Relationship for Learning Management System using Laravel

I have three model for the LMS which are Course, Section and Lesson. So under course there are sections and under sections there are specific lessons. I already got the relationship for Course and ...
0
votes
2answers
37 views

Can't update data because Call to undefined method Illuminate\Database\Query\Builder::save()

I want to update data from a joined table called siswas and gurus then it show a error 'Call to undefined method Illuminate\Database\Query\Builder::save()'. My database have a relationship on mySQL ...
1
vote
1answer
44 views

verify email after user have register, laravel

I know , just need write: Auth::routes(['verify' => true]); But, I should change name of url in router, so, I write: Route::group(['namespace'=>'Auth'],function(){ Route::GET('/dang-nhap','...
0
votes
1answer
16 views

Install mailparse on Debian GNU/Linux 9

Dear all got following error while installing Laravel 5.3 project: Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Warning: The ...
0
votes
1answer
16 views

Existing image is not displaying in edit form to update in larvel(5.8)

I am trying to make todo list wherein updating form other field value is shown but for image the value is read from the folder but not display in the input field. everything works fine else this ...
-1
votes
0answers
19 views

Change Laravel 5.8 'Whoops, looks like something went wrong.'. render

I understand I can create custom 404, 403, 500 etc pages. But I still get this response sometimes and I want to change it. Tried googling 'Laravel custom whoops response' - nothing regarding this. ...
0
votes
0answers
28 views

Get route that caused user redirection to login in Laravel

I have a Laravel application that the user needs to be logged in, in order to access some pages in the website. I need to show the user a custom message on the log-in page based on the pages user ...
0
votes
1answer
20 views

GroupBy and mapToGroups returns object in API resource

I am creating an API resource: public function toArray($request) { return [ 'permissions' => Permission::all() ]; } This is the result Permission::all()...
1
vote
2answers
57 views

Homecontroller does not exist error in php

Class App\Http\Controllers\HomeController does not exist HomeController <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Post; class HomeController extends Controller ...
-1
votes
0answers
14 views

Laravel package recommendations for Social Login + Auth + Double opt-in + Email verification

Do you have any recommendations for Laravel package specifically for the following? I am trying to speed up development and not reinvent the wheel, I need functionality for Login + Social Login + ...
0
votes
0answers
21 views

Extended latin characters missing on save() - Laravel 5.8

Long story short - whenever I'm trying to save string containing extended Latin characters (in my case Latvian), for example: Lorem Ipsum ir kļuvis par vispārpieņemtu teksta aizvietotāju kopš 16. ...
0
votes
1answer
24 views

Finding numbers of days between 2 dates in Laravel blade

I have this code (Laravel Blade): <div>{{ $user->paid_for_date }} (xxxx days)</div> paid_for_date - is date (ex 2020.05.15). How can I display the number of days for a given day in ...
0
votes
0answers
13 views

How to add script file via webpack

When I run "npm run prod" the contents of my JS files ( jquery.cssmap.min.js ) are well integrated into my final file ( frontend.js ). But when I want to use them I come across jQuery.Deferred ...
0
votes
2answers
30 views

Can't retrive data from join table

i have some table call guru and siswa they are joined in show method but when it show error on show.blade this my show method public function show($id) { $data = DB::table('siswas') -&...
1
vote
2answers
29 views

Laravel Return Redirect Back Variables Not Working Sometimes

i have a weired problem 1 : i submit form in a.blade.php and send params to controller x in my controller x i did some action i now i want return user to a.blade.php page with some variables such as ...
1
vote
0answers
16 views

Integrating a Google Maps Vue Component into a Laravel blade view

I am integrating a Google Maps Vue JS component into a Laravel application view using the vue2-google-maps npm package. As per the npm package documentation I am loading the vue components from the ...
1
vote
4answers
49 views

Can i use if condition on laravel database query?

Can i use if condition inside query, I want to use filter when $request->review = 7 it will show 7 days data and else condition default 30 days data . $reviews = Review::orderBy('created_at', '...
0
votes
2answers
13 views

Too few arguments to function App\Http\Controllers\CategoryController::destroy(), 0 passed and exactly 1 expected

i can not delete it by id and i have some code here for Model too class Category extends Model { // Table Name protected $table = 'categories'; // Primary Key public $primaryKey = ...
-1
votes
0answers
11 views

When working on Export Excel data to some data I have numbers [duplicate]

i have many table and i want to Export data from table (A) but some data in table (A) is ID for another Table because i will many to one relationship table with table (A) so .. let me show what data ...
1
vote
0answers
13 views

PHP Input type “datetime-local”: value not showing when in edit mode

Pick up Date <div class="form-group"> <input type="datetime-local" class="form-control" name="DatePickUp" id="DatePickUp" value="{{$pb->...
0
votes
1answer
29 views

The system cannot find the path specified1

win i run this cod i have this error C:\Users\Administrator\Mettco1> * * * * * php /c/Users/Administrator/Mettco1/artisan schedule:run >> /dev/null 2>&1 The system cannot find the ...
0
votes
2answers
34 views

Change message of invalid scope

How can I change invalid scope(s) provided message in Laravel Passport
0
votes
1answer
33 views

Set foreign key value to defualt value on delete in Laravel

I have a little issue that has been bothering me, I get the excess of the whole foreign key ideal, owever , could there be any way to get Laravel forign key to a defualt value whenever the reference ...
1
vote
1answer
32 views

Laravel custom validation to all model

I am using laravel latest version and i have a common field in all model called slug.I would to check whether slug is unique or not. i have slug field in all tables so i have extended Valdiator ...
2
votes
1answer
55 views

Error in using basic update query in laravel

I'm trying to run the following code which is in innoDB server to update value of a table using basic query form. but it's kept showing error. if(isset($_POST['col_opt']) && isset($_POST['...