226 questions
0
votes
0
answers
48
views
GeoPackage Export from Laravel and PostGIS
I have an issue with my exportGeoPackageWithStyle() controller. When I load the exported GeoPackage file into QGIS each feature has no geometry thus their extension could not be found. When I load the ...
0
votes
1
answer
682
views
passing data through controller via return view in Laravel 11
I am currently trying to learn Eloquent ORM but first I am trying to pass some static data to my Controller.
Here is the snippet of my Controller
SCControler.php
<?php
namespace App\Http\...
1
vote
0
answers
124
views
Undefined Array key "link" error in srmklive paypal package in laravel
I am a newbie. I have a saas project where I have used srmklive paypal package and it has the following code to create a new order. But when I click on the button, it shows an Undefined Array key &...
0
votes
2
answers
149
views
Laravel: 'Get' Route not calling method in controller
I have a route as:
Route::get('/edit/detail/{modelName}/{rowId}/{persId}',[AddPersInfoController::class,'editPersDetailTabs'])->name('edit_pers_detail');
and I'm calling it from a button in a table ...
1
vote
2
answers
75
views
How to make random number with format 25-3456 and 165.09826 in laravel?
I want to create a random number with a format like that which will be used as an invoice number and also a contract number when making transactions, I use the Laravel framework
$request['no_vak'] = ...
0
votes
1
answer
42
views
Can I get same data using POST rote that I got using GET route
I have two routes in my Web.php,
Route::get('/employees', [ApiController::class, 'employees'])->name('employees');
Route::post('/employeesPost', [ApiController::class, 'employees'])->name('...
0
votes
2
answers
3k
views
Laravel 10 custom login/registration not going to dashboard page
I am trying to make my own custom laravel 10 login/registration because i didn't want to use the breez package because i wanted to learn how do you make a login/registrasion by yourself.
But I cant ...
0
votes
1
answer
2k
views
Laravel: Updating data with modal in table
I have an edit button in every row in a table that opens a modal form to edit a user's information. I want to fill in the inputs with the data of the specific user I chose to edit from the table. ...
0
votes
1
answer
831
views
Laravel: Login doesn't redirect to home
I am having issues logging in using Laravel. Every time a user logs in, it redirects them to the post route (a blank page) instead of home, which is the intended route. Even when I login with the ...
-2
votes
2
answers
432
views
Laravel Namespace Resource Controller Routing
I was working on a laravel project. The following is the code of my UserController:
<?php
namespace App\Http\Controllers\Backend\Admin\Users;
use App\Models\User;
use Illuminate\Http\Request;
use ...
0
votes
1
answer
45
views
How to filter common users from multiple belongstomany relationship pivot tables in laravel
There are table diagram
Sellers table are main table. Services and Areas tables can contain multiple services and areas for spacific Seller. For this I use seller_services and sellerable Pivot table ...
-1
votes
1
answer
40
views
Laravel trying to store image file in 3 different folder
I'm trying to store image in 3 different folder inside public folder now I'm able to store in two different folder but when I added 3rd folder path but it was not coping in 3rd folder help me to solve ...
0
votes
2
answers
537
views
I cannot delete data which have many-to-many relationship in laravel 9
I am using PHP 8.2.0, MySQL 8.2.0, and Laravel 9.48.0. This is my database migrations file pivot table (category_menu):
public function up()
{
Schema::create('category_menu', function (...
0
votes
1
answer
16
views
How Do I Get Search To Work In Another File?
My issue is I can't get search to work when I use it on a header and want it to work on my orders file. I can not seem to get the input so it gives me a 404 error.
My search on header from ...
0
votes
1
answer
82
views
Why am I not able to return a view with ->withInput() and ->with() in Laravel
Why am I not able to return a view with ->withInput() and ->with() in Laravel.
I want to show old input for user when user is making a search and also a flash message. But currently, it does not ...
0
votes
1
answer
376
views
Laravel 9: imagettftext(): Invalid font filename
I have a Controller method like this:
public function singleChar($text)
{
$font = 'SansBold.ttf';
...
imagettftext($img, $size, $angle + 5, $textX + 5, $textY + 10, $shadowgbColor, $font, $...
-2
votes
1
answer
84
views
laravel nested controller with 3 model
is possible to use 3 model in laravel nested controller?
this my route now:
...
'supplier' => SupplierController::class,
'supplier.item' => SupplierItemController::class,
...
i want to use 3 ...
0
votes
1
answer
381
views
how to calculate % progress based on two tables with where condition
What is the best way to calculate the % progress of the activity based on the completed activity task points and total activity task points at the same time get the total number of activity task
I ...
0
votes
2
answers
3k
views
Unable to send ajax data to Laravel controller
I'm just trying to send the editable table row data to the controller onClick of the Save button, update that data in the database, and return success.
But I cannot display the data inside the ...
0
votes
5
answers
3k
views
Method Illuminate\Database\Eloquent\Collection::orderby does not exist
$posts = Post::all()->orderby('created_at','desc')->where('usr_id','=',session('LoggedUser'))->get();
return view('admin.profile',compact('userInfo' , 'posts'));
i am making a custom ...
-1
votes
1
answer
618
views
How to update table records, but only form fields that have data in them?
In my controller, I have my create record method, but I want to edit existing records, but only update the fields that are filled out. I try to only fill out one or two fields on the edit property ...
1
vote
1
answer
106
views
The array will send only the first element to the database , how to send the array of 3 elements in Laravel-8 controller through API?
$client = new Client([
'base_uri' => 'http://localhost',
]);
$response = $client->request('POST', '/API/customerOrder/createOrder.php', [
'json' =>[
'SKU_QUANTITY' => [9,...
1
vote
1
answer
2k
views
How to show message to the user after email verification in Laravel?
I want to display a message to the user after email verification. Getting an email to email verification after new user sign up to the website. There is a VerficationController. how I can modify to ...
0
votes
1
answer
2k
views
My laravel Yajra datatable does not render. It says invalid json response. However I can not read the error since the response is empty
Hello I have the following controller method to return data to my datatable in Laravel,
Controller Method
public function get(Request $request) {
return Datatables::of(AppUser::all())
->...
0
votes
1
answer
645
views
laravel withCount() Cardinality violation error when relationship is hasMany
This is my models:
//project model
class Project extends Model {
.....
public function items(){
return $this->hasMany(ProjectItem::class,'project_id');
}
}
//project items model
...