How to get job ID after dispatching? Right now I do it like this:
public function store(UploadFeedRequest $request)
{
UploadFeedJob::dispatch($request->validated());
$jobId = DB::table('jobs')->latest()->get()->first()->id;...
There is a code like this, which is located in
public function store() {
// #code
if ($request->hasFile('passport'))
{
foreach($request->file('passport') as $index => $passport){
$name = ($request->pa...
hi everyone I have a warning in my wordpress website the warning is : 'Notice: Trying to access array offset on value of type bool in'
what's the problem?can anyone help?...
I'm currently working on a tier pricing system in PHP. A product can have a price, but it also has an additional printing tier price attached to it. For example:
Product price:
array:10 [▼
0 => array:2 [▼
"qty" => 1
&quo...
every beginner in php use var_dump to debug there php code . but is there any alternative like xdebug or some thing ?
if any one used xdebug . how did you used it to debug your application ?
what is your IDE like phpstorm or text editor like sublime...
Hi everyone! I have a pivot table between Cars and Offers models / tables. I also have included 'price_from' and 'currency_id' columns in the pivot table as it makes sense to save those information there.
Migrations
Cars
public function up()
{...
Laravel JetStream looks like a huge timesaver, but with Inertia.js it will only provide a Vue front-end, however I'm wanting a React front-end. I'm wondering if anyone has managed to do this, and if so would be willing to contribute their code to the...
Hey, I've followed a tutorial on making a datatable in Laravel, but I can't work out how I can get relational values. For example, my table 'exchange_rates' has a customer_id column which has a relationship to the customer table. I would like the dat...
I need a way to take a PDF or TIFF , split into separate PDFs based on 2D barcode found (split code) on a page... even if i have a tool that can split a PDF into mutliple PDFs based on page #s
I searched packagist and cant find what i want?
I am loo...
App has been replaced with my app's name.
Has anyone else had this issue?
Whoops, looks like something went wrong.
1/1
FatalErrorException in ArticlesController.php line 57:
Class 'App\Http\Controllers\Auth' not found
in ArticlesController.php lin...
Hi folks! I am a Junior web designer & just want to know what kind of parallax scrolling is on this website https://www.branex.com/ . if you have a source code for this kindly share it.
Your Best Regards
REX...
Do we have library for open graph like will check any url in the content then will get the meta description, image, name and other.
Please provide link or sample if there's any.
Thanks...
Hi everybody, I set up my laravel app to use mailgun driver for sending emails, now I want to use one of Mailgun's features, that is batch sending, however using laravel's Mail facade doesn't let me do batch sending, atleat I haven't seen any tutoria...
I have a database schema like this
posts
id - integer
name - string
videos
id - integer
name - string
tags
id - integer
name - string
taggables
tag_id - integer
taggable_id - integer
taggable_type - string
I...
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in
your SQL syntax; check the manual that corresponds to your MySQL server versi
on for the right syntax to use near 'CHARACTER SET utf8mb4 NOT NULL COLLATE utf8mb4_unicode_ci...
What chart library to use with laravel, i just need some basic chart like bar,pie and line chart. I see from chartJs, chartisan and highchart. Is there any perceivable difference between these libraries?...
Hi,
In Laravel I'm sending a plan html mail with an <a href="https://mydomain.com/movies"> tag. However when I open this mail in gmail and click on the link it's redirecting to:
http://email.mydomain.com/c/eJwVjktqxDAQRE9j7zSoP_p44UU2...
// tables -------------------------------------------------------------
order table - user_id, etc
order_items table - order_id, product_id, price,qty
review table - user_id, product_id etc
I want to Allow review only for those who have purchased th...
How can we create a route that opens with slug name or its id. I watch the video but i don;t get that
Here is example
Route::get('/courses/{slug}/{id}', '[email protected]');
My Controller.
public function index($slug)
{
return &...
I have a table that is a select-query-heavy table and it implements polymorphic approach.
images
id - integer
foreign_id - integer
foreign_object - string
file_path
Which is the correct way to apply index?
$this->index('foreign_id'...
// get transaction reference returned by Paystack
$transactionRef = request()->input('reference');
//verify the transaction is valid
$transaction = Payment::hasValidTransaction($transactionRef);
auth()->user()->newSubscription('def...
I am new to Laravel Audiing. I have installed OwenIt\Auditing\Models\Audit and it works great recording the user id and other values. Each of my records also has a customer id that needs to be recorded so that you know which customer's details was ch...
Hello to the amazing Laravel community
Background:
I used to code in college, now starting to code again.
What should I learn before diving into Laravel?
Thanks :)...
Hello,
this is how I handle a file upload:
$fileModel = new File;
if ($request->file()) {
$fileName = time() . '_' . uniqid() . '_' . $request->file->getClientOriginalName();
$filePath = $request->...
I have started this thread for everyone to favourite and share with others when the OP doesn't conform to, well, these guidelines. They are not meant to be hard and fast rules but as the title suggests, guidelines. If we all start on the same page th...
why big websites sometimes use very long URLs and random get variables? what's the purpose??
like this one when u do simple images search in google
https://www.google.com.sa/search?q=test&newwindow=1&safe=strict&hl=en&tbm=isch&sxs...
Hello,
I have a file model like this:
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class File extends Model
{
use HasFactory;
protected $fillable = [...
Hello
I'm learning inertia and I'm creating my first app. I'm creating a simple component that read-write tweets and display them.
Tweets/Index.vue
<template>
<app-layout>
<template #header>
<h2 class=&quo...
Hello Community,
I'm new to Laravel so thanks in advance for your patience to my questions ;)
I started reading and installing according to the documention, just playing around a bit. As far as I understand it right it's recommended not to use Larave...