Questions tagged [laravel-5]
Laravel 5 is the previous 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.
62,812
questions
0
votes
2
answers
15
views
how can I make each <tr> clickable in php?
i have the following code in php using laravel blade which allows me to get all the days of the current month as a table , I want to make each "" clickable with php , im not sure if thats ...
0
votes
0
answers
14
views
php artisan optimize handling the post-update-cmd event returned with error code 255
I run composer update to laravel 5.2 project.
The website returns HTTP:500 error and php artisan commands returns blank.
Please help me with your experience
1
vote
0
answers
35
views
Compare payments.student_id and enroll.student_id if not the payment button should display in laravel
process: from the student registration (enroll) page (figure 3) should be able to check whether the student paid or not, if not paid Pay button should be visible. else display PAID message.
to do the ...
0
votes
0
answers
12
views
Why Respones api time in cloudflare is much more than local server?
If the local time arrives at 200 ms, it reaches 3 seconds in the cloudflare.Why is there such a difference
between the ttfb time, even though both Local and cloudflare are the same project? There is ...
2
votes
1
answer
45
views
Laravel 9 add new key and values using crossJoin collection
so i have a table Items my table has a row product and price only. my goal is how to
add key with values using crossJoin collect
here is my code when fetching all data in my table im using each ...
0
votes
1
answer
25
views
Laravel single blade file used for create and show
Is it possible and recommended that I have one lets say form.blade.php with html form file used for create new data and show existing data by ID.
I want to create this becouse file for insert and ...
0
votes
1
answer
24
views
How to include the blade file in to another blade file modal popup using Laravel
I developed the one product details blade file and I want to include another blade file inside the product details page modal popup and this blade file doesn't have a different layout. and I included ...
-1
votes
0
answers
22
views
I am not able to find where my files are being downloaded [closed]
This is my controller. I am trying to download files from an FTP server in Laravel console controller. I don't know the directory where my files are being downloaded the through console. I am able to ...
0
votes
1
answer
24
views
Job which implements ShouldQueue does not write to database
I'm trying to implement the basic queue in Laravel 5.7.
I have run the migration which creates the jobs and failed_jobs tables.
I have updated the .env to QUEUE_CONNECTION=database and QUEUE_DRIVER=...
0
votes
0
answers
18
views
Need to pull out subscription that fallen under condition
I have some issue to resolve the complex nested eloquent whereHas in laravel.
I would like to achieve the scenario by using below eloquent query.
The user should only be allowed view the subscription ...
-1
votes
2
answers
24
views
Call to undefined function curl_init() on console Command laravel
I want to call curl_init() on console Command laravel but I'm getting error "Call to undefined function curl_init()" ?
but when I call curl_init() from Controller laravel is working fine.
...
0
votes
1
answer
30
views
query inside with eloquent
image address has location and total number of users.
Users::with(['address'=>function($query){
$query->where('location', 'NAXAL');
$query->order By('total');
}])->get();
...
0
votes
1
answer
47
views
How can I decode a Laravel encrypted String in VB.Net
I can't seem to find a valid answer to this issue...
I am encrypting a password in Laravel using the built in Crypt::encrypt() helper function and passing in a simple string value (let's say 'abcde' ...
-2
votes
0
answers
21
views
I am currently using pdftk to generate a fiilable pdf with the data required. However, the data can be for multiple forms
For example, my pdf is fillable and has a attribute name : to be filled
However, while generating for a single name Megatron eg. the file generates once but I will have n amount of names which will ...
0
votes
1
answer
22
views
Laravel many times route access
I want to know if Laravel has any route control, not for authentication, but for counting access. That is, I need to know the many times I have accessed this route. Is it possible in Laravel?
Or how ...
0
votes
0
answers
15
views
Laravel 5: Call to undefined method Redis::connection()
I am using redis to publish notifications. Here is how I am suing it:
$redis = \Redis::connection();
I am using _ide_helper package so when I ctrl+click on connection method it takes me to ...
-1
votes
2
answers
33
views
Validation if the value exists else no validation
So, this is what i've tried already.
$regex = '/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/';
$rules = [
'nextcontactSchool' => 'nullable|digits_between:7,10',
'...
0
votes
3
answers
41
views
Laravel hasOne can't only one attribute from the relation model
I have a Model called User That has one to many relation with orders
I'm trying to get using an eloquent relation the first order date he did
I tried adding in the User Model
public function ...
0
votes
0
answers
19
views
Command "make:import" is not defined
I've installed the Laravel excel as it's required
but I can't run this commande : php artisan make:import TextsImport --model=TextReg
the error :
Command "make:import" is not defined.
I ...
0
votes
0
answers
16
views
Why Redis keys are not created sometimes?
Radis doesn't get cached when I name getFeaturedCatalogsBySubCategoryId but it does get cache when I name getFeaturedCatalogBySubCategoryId.
The code format is this...
not working
if (!Cache::has(&...
0
votes
0
answers
12
views
Dompdf Laravel return certain table in view as black block
I am using barryvdh/laravel-dompdf version 0.8.4 in Laravel 5 to create a PDF from a view. Before i do composer update, the pdf working just fine, but now its showing up like this
It was supposed to ...
0
votes
0
answers
30
views
how add image upload in TinyMCeditor laravel
i'm trying to upload images in between my blog content but when i select images from the gallery its shoes the error Route[/] not found, even though the route is defined correctly
create.blade.php
<...
-1
votes
2
answers
44
views
how to get name from url dynamically
How to get a part of the url?
query to be made:
$name = 'LeSant'; // (from url dinamic) //
$event = Dias::where('name', $name)->first();
How can I get name from the url? /event/LeSant
0
votes
1
answer
13
views
How to load view file from another root directory in Laravel 5.8
I want to load view file from another root directory.
Example :
public function getProducts(Request $request)
{
return view(http://localhost/laravelApp/view/products, $data);
}
http://localhost/...
0
votes
2
answers
40
views
Cache clear probem in Larave
I have a problem. I am download project from hosting. now when I run the project this error shows.
pic attached.
I think this is cache problem, I clear cache, view, but still same issue.
0
votes
1
answer
31
views
How to get name property from select option in laravel
I want to search from input field but want to get the property from the select option. Like I want mobile number to be searched from DB , but when i select mobile from select option then it should be ...
1
vote
0
answers
33
views
how to call one api to another api in laravel using wamp server?
in Web.php
Route::get('/apiforsales', [LeadController::class, 'apiforsales']); //this working fine.
Route::get('/apicheck', [LeadController::class,'apicheck123']);
LeadController.php
public function ...
0
votes
1
answer
24
views
how to include php file in larvel ckeditor?
Hey I would like to include a php file into my larvel blog page using, ckeditor. I have 2 problems when I add in tags they are commented out and html tags are just filtered out in the database. When ...
0
votes
1
answer
54
views
Swift_TransportException: Expected response code 250 but got code "", with message "" in AbstractSmtpTransport.php:383
I have a laravel application that has been sending emails for Years now. Recently, emails have been failing to send. When I check the failed_jobs table, below is the error message:
...
-1
votes
0
answers
30
views
Twitter api returning html response as error
My code
$connection = new TwitterOAuth(SOCIOMATIC_HFW_API_KEY, SOCIOMATIC_HFW_API_SECRET);
$connection->setTimeouts(1000, 1000);
$request_token = $connection->oauth("oauth/request_token&...
0
votes
0
answers
27
views
php - How to upload TAR.GZ file from Laravel
I am trying to send a tar.gz file from Laravel as a response, but it is not working properly. What is the error in the code?
Here $filepath is the absolute path to the tar.gz file.
if(file_exists($...
0
votes
2
answers
84
views
Undefined variable in boostrap modal - Laravel
I have a $room variable inside bootstrap modal and it is causing the problem.
Here is the function in the reservationController:
public function create()
{
$room = Room::all();
return view('/...
-1
votes
0
answers
21
views
The url redirection is not working properly in laravel
Any false url redirecting to home page in my laravel site. It is required to be redirected to 404 page.
0
votes
0
answers
53
views
concatenate two values in register
I am modifying a register page, I need to concatenate two values
<div class="col-xs-12 col-md-3 input-group">
<input name="tomo" type="text" class="...
0
votes
0
answers
64
views
You do not have the SUPER privilege and binary logging is enabled
I am running a laravel migration from jenkins that creates a stored procedure and the following error appears:
SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege an
d binary ...
-1
votes
1
answer
73
views
Undefined class constant 'MAIN'
We have the following migration:
class CreateAccounts extends Migration
{
public function up()
{
$data= [
"id" => \App\Account::MAIN,
"...
1
vote
2
answers
75
views
how to use whereHas in laravel
I am new to laravel,
I need to create a query for the db,
$query = Deal::query();
I want to use the wherehas operator.
this is my code that is worked.
else if ($group_by == 'precedence') {
...
0
votes
0
answers
8
views
how can prevent user to use same token in laravel?
I have created api based web application..Actually I am able to login my lower level user as higher level user when I pass higher level user's token to lower level user.I have used cookie to ...
1
vote
3
answers
56
views
yield inside section in Laravel 8
I am trying to yield a section inside another section which is itself yielded in master.blade.php, but it does not work.
master.blade.php
<!DOCTYPE html>
<html lang="en">
<...
-2
votes
3
answers
54
views
How to get array values using foreach in laravel
I am new to laravel and php. I have this code in one of my controllers:
$group_by_precedence = array("true", "false");
And this code in the view:
@foreach ($group_by_precedence as ...
0
votes
0
answers
21
views
Outlook not receiving mails from Laravel hosted website [duplicate]
I have implemented a mailing system in Laravel which send mails to the users. When tried from localhost, it is sending emails to both Gmail and outlook, but when I moved the code to production only ...
0
votes
0
answers
52
views
Unexpected behavior of Laravel 5.4 pluck after migration
Introduction
💡 Please: Look at the Update and the Conclusion at the end below first.
I have laravel-5.4 app that runs fine on the following software configurations:
Kubuntu 20.04
PHP 7.4.29 from ...
0
votes
0
answers
32
views
How can I use laravel localization into vue components?
I'm currently working on application's translation with Laravel Localization (laravel 5.6).
I succeed my text translation on blade templates but I have some view using vuejs.
Into them I can't use ...
1
vote
1
answer
51
views
PHP errors after installing Dompdf in Laravel
I ran this:
composer require barryvdh/laravel-dompdf
Then I registered in bootstrap/app.php:
$app->register(\Barryvdh\DomPDF\ServiceProvider::class);
Then I tried to publish:
php artisan vendor:...
0
votes
0
answers
37
views
Laravel Console Command Failing to Complete Execution
I have the script below which is used to send messages (sms, email & whatsapp) to some 300k customers. Things where working fine before but for some days now the script is bugging (it freezes at ...
0
votes
1
answer
33
views
Laravel | is it possible to specify 2 different domain in one laravel project
I have one weird requirement from the client to access the website from 2 different domains but it should be the same code base and the same database so is there any way in .env file I can specify ...
0
votes
0
answers
45
views
Why does Laravel storage uploads files to the storage directory?
Is there any special reason why Laravel storage uploads files to a directory in the storage folder and then require creating a Symbolic link to make those files accessible publicly?, why not just ...
0
votes
1
answer
53
views
What is the purposes symbol @ in PHP $variable at blade laravel 5? [duplicate]
How do you do ?
I would like to ask about symbol @ in PHP $variable in blade laravel 5. This is the code that I get, but unfortunately the previous programmer was is lost.
Please note at this -> {{...
-1
votes
2
answers
38
views
How to stop the GET method is not supported for this route from showing?
I have a working Laravel project with loads of different routes.
I'm currently testing it and one of my tests was to check if a user were to use a delete or post route from the URL. I didn't know what ...
0
votes
3
answers
65
views
i have a variable which i want to share its values with all my controllers - Laravel
I have a variable that is $data1, i want to share the value of $data1 with all my controllers and use it
in my >FirstController
$data1 = reservation::select('user_id')
->where('date',request('...