I am trying to develop a multi-tenancy application without using Package in Laravel-5.8.
I have gone through the multi-tenancy videos in Laracast, but some things were not treated. I am using traits and scopes
Models
class Company extends Model
{...
I asked again last night, but I think I did it in the wrong category. So I started learning Laravel + Vue but I wake up with a problem on the post request side.
Let me show you how to proceed
data() {
return {
questions:[],...
Not sure why this is not working. I need to add an id to existing pivot table. So there is currently no "id" column so I add that to the db.
I added "id" to the relations ->withPivot('id', 'question')
Now this set all id's to t...
1st in .env file i keept
FILESYSTEM_DRIVER=public
then i linked two directory with
php artisan storage:link
while viewing the page source code image path is showing but image is not showing while browsing
here is my blade file
@if ($brands->...
Hello out there,
I'm just working on my first laravel project in a multi-column-layout. In case the user is logged in, i want to show relevant notifications on the right columns.
$notifications=auth()->user()->getUnreadNotification()->orderB...
Hi Laracast users,
I have made a project with some portion in laravel, lumen and core php. Now i need to veryfy active user via Passport or sanctum token. How can i used same api token for both project laravel and core php for authenticataion....
Somewhat new to Laravel, but what is the best method of creating a message to let the user know that Session has timed out. And when they click on OK, to automatically send the user to the login screen for the entire website.
Currently, even when th...
I have relationsip like below between user and store,
User.php
public function vendorstore()
{
return $this->hasOne('App\Store');
}
Now i have a search button in user listing page and the format of user data and store is like bel...
Hi folks, hey, how would you create a theme switcher for the frontend ,controlled from the backend? I'm currently testing with four files at the moment. Where I have put comments, is where I need help with.
theme.blade.php:
@extends('admin.index')
@...
Hey, I'm having the error compact(): Undefined variable: answers when runnig the code below and I don't understand why, someone can help me?
Code:
public function getQuestions($id){
$questions = \DB::table('questions')->where('testid...
Hello,
In my Laravel 8 app I created a component with a command :
php artisan make:component Admin/Auth/loggedUserHasPermissions
and I call it in my blade file as :
<x-admin.auth.logged-user-has-permissions :logged-user="getLoggedUs...
Despite the env file correctly set, with all the DB settings (included DB_USERNAME and DB_HOST) and the database config file left untouched, when I make an API call (through a route defined in the api route file), I get the error in the title.
Howeve...
I have a laravel gateway (with sanctum) and some microservices. Apps should use the API Urls at gateway, which do request to the right microservice. Microservice return json to gateway and gateway back to the user. Not I want to make it more secure....
Hi,
I am developing an app for a restaurant.
How do I put multiple users on a pivot table. as if the reservation is made by all table participants and not just one.
Instead of having a pivot table with a unique user_id I need to have the server_id of...
Hi everyone, I hope I can explain this well enough to be understood.
I am creating a blog which has SEO friendly routes like so:
Route::get('/article/{type}/{category}/{article}', [App\Http\Controllers\ArticleController::class, 'show'])->name('art...
In my index.html file I have an html file. Upon submission, the request will be submitted to a different domain via Ajax. The project is working fine on one subdomain but when I move my codebase(all files and folders)to a new subdomain I got an error...
Hey I am new here. I would love to know the things i need to have and/or do to be able to build a website like instagram and an admin back-end with it....
The "C:\xampp\tmp\phpFABF.tmp" file does not exist or is not readable. how to give proper path ..
getRealPath(),
{
return $this->from('[email protected]')
->subject('New file received')
-...
I recently downloaded the Inertia pingcrm project to test out Inertia. In there I tried to use just an axios call like so
axios.post(this.route('posts.store'), {item: 'test'})
.then( res => {
console.log(res.data);...
Description
How an array of selected users assigned to a public property i.e. $selected = [], which is defined in a trait i.e. WithBulkActions and used in the component i.e. UserController, can be passed to a nested component i.e. UserBulkDeletion wh...
use App\Product;
use Illuminate\Http\Request;
class ProductController extends Controller
{
public function index(){
$products = Product::inRandomOrder()->take(6)->get();
dd($products);
return view('products.index');
}
}
my Product model is : Pr...
How I upload a file from local to google drive, In my case, I am generating a pdf and uploading it to google drive
$path = \Storage::disk('google')->putFileAs("$dir" , $pdf, 'filename.pdf'); , $dir is google directory id. I want to uploa...
I would like to disable the current date in the bootstrap date picker after 4 PM. If the time passed 4 PM then the user is not allowed to select the current date.
<input class="form-control datepicker" id="datepicker2" name=...
I want to add google recaptcha in Laravel Fortify login validation rules.I didn't find at the documentation how to add or override this.I found Login validation in vendor\laravel\fortify\src\Http\Requests\LoginRequest.php but i know that is a bad id...
Hi
I have an eloquent model where a-parent -> b, b-child -> c
a-parent is not related to c
In fact model-c is just an up table and I would need the name.
I would like to do an eloquent join of these 3 models. Is it possible?
My understanding i...
Sorry for asking the same question again but I need just all the previous year from the current year
This is my All Financial Year created in helpers. This date " 2018/19
" means for my Nepali date also so I have to created this.
function g...
i have the route which fetch the data when i send the request,
with that data in the blade view i have the button to select the ID and update
it update well but am get this error
The GET method is not supported for this route. Supported met...
Hi,
I am using the below code to pick the date from the bootstrap calendar and I would like to restrict the current date selection if the time passed 2 PM. Can any one please give me to achieve.
<script>
var date = new Date()...
I am using Laravel Websockets (by BeyondCode) - https://beyondco.de/docs/laravel-websockets/getting-started/introduction. May I know how can I install it on IIS8? I have no problem configured it on localhost.
I have no knowledge about IIS. I tried cr...
Hello for those who are using barryvdh\dompdf laravel. I have a problem with the image of the PDF that I am sending in email. My issue is that the image background would not show and it would say that Image not found or type unknown. It just occurs...
I have a table that as a list of roles and what I'm trying to do is when a user uploads a new position it needs
to compare the differences between the new roles and the old roles.
So what I'm trying to do is get some kind of list that will give me a...
Hello everyone,
I want to create the data structure that will be used inside the program, it will not be used directly to return the response to a page.
for example:
I want to create the NotificationDocument which is a custom data structure ( it is n...