Hello ...
i want remove Jetstream from my existed project and replace it with Laravel ui
so i reomve Jetstream from composer by commend
composer remove laravel/jetstream
and
Edit away
app/Http/Kernel.php - \Laravel\Jetstream\Http\Middleware\Authenti...
How could i resolve this security header error ?
Chart.min.js:7 Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' 'nonce-xbpNXdLJ1woVJHhbCRCmJJwcMCLro0Qu' cdnjs.cloudflare.com fo...
I'm using Laravel 5.3, and following this tutorial to get myself set up with Google Cloud:
https://cloud.google.com/community/tutorials/run-laravel-on-appengine-standard
I'm at the part where I'm trying to run my database migrations, so I do:
export...
How can i convert following time into Sri Lanka time.
"recording_start" => "2021-02-26T03:49:20Z"
"recording_end" => "2021-02-26T03:49:26Z"
I tried. this one not works
$recordingStart = \Carbon\...
I followed the setup process for Laravel Sanctum and when I run
axios.get('/sanctum/csrf-cookie)
I get a valid 204 response but no CSRF cookie in the response, only the session cookie.
cURL Request:
curl --location --request GET 'localhost:8000/sanct...
So I have a new project which has the most recent version of Laravel and Jetstream installed.
I enabled the api-tokens page and made a test token. I'd like to use this token to login.
I was reading through the documentation here:
https://laravel.com/...
I had this in my model and just noticed that its not showing items that are not published in my datatables on my index.blade.php view.
I only want this to apply front end of the site in my loops for example. not in my admin side of my site.
Can anyon...
i have field named arrive_location
arrive location have just two value (exist, new)
in eloquent
$orders = Orders::select('id', 'users_id', 'arrive_location')
->with('users:id,fname,lname,telno')
i want if arrive_location == n...
I tested on all browsers on my laptop, I get the value
But I tested it on my iPhone, it works fine at chrome but no in safari.
do I need to save it?...
on a dedicated server with CentOs I keep getting this error.
file_get_contents(phar://../storage/logs/laravel.log/test.txt): failed to open stream: phar error: invalid url or non-existent phar "phar://../storage/logs/laravel.log/test.txt&...
I have a One To Many relationship, with two models, I need a CRUD with an array to save "zones" to "labels", by example:
Label: Columbia Records
Zones: USA, UK, Germany
so I used a One to Many relationship with an array for Zones....
Hello everyone,
I am trying to connect to an SQL Server Database but I get an error. The error says that there was an error with the user 'haritz'.
SQLSTATE[28000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Error de inicio de sesi\u00f3n...
I created the middleware but for a long time it was working but now it's now working guys I need your help
(1/1) ReflectionException
Class App\Http\Middleware\VendorMiddleware does not exist
in Container.php line 788
at ReflectionClass->__constru...
Hello,
Could someone explain me why I am receiving message: "CSRF token mismatch." , from server when i send api post request from React project (get request ok)
It's working fine if i send request from Angular project or Postman .
Thanks...
i included the minified toastr css and js file but its not working help me to get toastr notification
here is my view
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta cha...
Has anyone managed to hook Laravel Cashier up with the Stripe React frontent library for subscription payments?
I'm really struggling despite reading both sets of documents multiple times how to hook them up.
I've also tried googling extensively but...
Hello guys,
I have a question. What would be the best approach for a multiselect that uses two queries. One for providing the list of options and the other for the options that have been selected?
So I have this method that queries for all the availa...
Hi, I have 2 models, Post & PostImage. PostImage has many images related to a particular post. The PostImage model has a database field called "is_main" that flags the main image of the post.
My question is how can I adjust the Post mod...
I get my model
$users = User::all();
Pass to my view:
return view('pages.user.index')
->with('users', $users);
But now I want to pass into alpine:
<div x-data="{ items: {{ $users }} }">
That all works!
But if I do:
$user...
Hello guys i have a problem:
I use a glide library (library for images) with laravel and i use a helper method
function image (string $path, int $with, int $height): string {
return app(\App\Service\ImagePathGenerator::class)->generate($path, $wit...
I am using jquery ajax to edit the content of my form and calling the update method in my controller.
Ajax request:
$('#updateReply-{{$reply->id}}').click(function(e){
e.preventDefault();
$.ajaxSetup({
hea...
So, I'm currently developing this package to enable/disable features thoughout an app.
(Please don't suggest other packages, I examined other alternatives and concluded that none of them fit my exact needs or were total overkill with too many feature...
the gmail smtp-relay works fine using the sync driver, but if we queue the email we this error. cleared config, cache, & restarted queue workers. tested in prod and dev, same results
[2021-01-24 20:04:22] production.ERROR: Expected response code...
Hello, Im using the https://github.com/baopham/laravel-dynamodb package to access/write messages in a Dynamodb table, but all Im getting is this when I try to get:
DynamoDbException in WrappedHttpHandler.php line 192:
Error executing "GetItem&qu...
I am trying to view mail markdown within the browser and it returns error "No hint path defined for [mail].".
php artisan make:mail Test --markdown=emails.test
Build method from mail class
public function build()
{
return $this->mark...
Hello,
I'm trying to get current user because I need to use view() helper function to share User object in all my views.
It doesn't seem to work, however, when I use Auth::user() in AppServiceProvider's boot method, it always returns null.
any id...
Usuallly migration files have names like create_users_table.php or add_users_post_id_column.php but what do you call it if it has multiple things inside like this?
I don't think it should be called 2021_10_12_000000_add_users_img_url_and_server_id_an...
Hi,
Basically I have a form with a large table on a page which has 169 rows on there.
Illuminate\Database\Eloquent\Collection {#1530 ▼
#items: array:169 [▶]
}
Now when i go to submit the form to update the values it only returns an array with...
Laravel's policy methods match up with controller methods by name. How does this work with single-action invokable controllers that don't have a unique method name (it's always __invoke)? I'd guess that there might be some built-in mapping for common...
What is best practice for Table Deleting ? onDelete('restrict') or onDelete('null') or onDelete('cascade')
Please let me know your answer
Eg:
Schema::connection($dbConnection)->create('course_user', function (Blueprint $table) {
$ta...
This is not exactly a Laravel, or even PHP issue, but more nginx.
Has anyone setup nginx to use client_max_body_size for specific paths? Something like /blah/upload gets 250MB while the rest of the app has nginx default
I assume there is a good reaso...
I have below code in one of controller function which I am trying to access through API.
if (Auth::Check()) {
//more code
} else {
return response()->json([
'message' => 'Please login',
);
}
I used Bearer Token but I can't login...
Hi Guys,
My problem is that my system can create permissions with db: seed, but when I try to create a role in combination with a user it doesn't work properly.
Although my user and the role are created, no authorization is assigned to the role and m...
So my site has many posts (topics) when a user signs up for the website they are asked to pick categories they would like to see topics about.
I'm trying to implement notifications that when a new topic is added by an admin and the category matches a...