Guys do u know why laravel project says server failed when you try to download a file uploaded by users in your project?

|
cartltech 2020-06-04 00:09:58
jkwya 2020-06-04 00:03:05
I have a form with one input and one select fields. I wanna be able to show the result without submitting the form. When user type in a value in input field and choose an option from select, it should automatically give the result. Any suggestions?

Use Ajax with html doms
Lookup onkeyup,onclick ,onchange as even listeners to run the the Ajax query that would send the form data to your laravel controller and return the result

laksomphear 2020-06-04 07:22:49
Help me how to make real notification in laravel?
2020-06-04 11:55:04
devmansurov 2020-06-02 21:24:33
How does a user create in a class when there is no method for creating a user in an extending class?

Class
CreateUserByCredentialsTask.php

<?php

namespace AppContainersUserTasks;

use AppContainersUserDataRepositoriesUserRepository;
use AppContainersUserModelsUser;
use AppShipExceptionsCreateResourceFailedException;
use AppShipParentsTasksTask;
use Exception;
use IlluminateSupportFacadesHash;

class CreateUserByCredentialsTask extends Task
{

protected $repository;

public function __construct(UserRepository $repository)
{
$this->repository = $repository;
}

public function run(
bool $isClient = true,
string $email,
string $password,
string $name = null,
string $gender = null,
string $birth = null
): User {

try {
$user = $this->repository->create([
‘password’ => Hash::make($password),
’email’ => $email,
‘name’ => $name,
‘gender’ => $gender,
‘birth’ => $birth,
‘is_client’ => $isClient,
]);

} catch (Exception $e) {
throw (new CreateResourceFailedException())->debug($e);
}

return $user;
}
}

——————————————————

Class UserRepository.php

<?php

namespace AppContainersUserDataRepositories;

use AppShipParentsRepositoriesRepository;

class UserRepository extends Repository
{
protected $fieldSearchable = [
‘name’ => ‘like’,
‘id’ => ‘=’,
’email’ => ‘=’,
‘confirmed’ => ‘=’,
‘created_at’ => ‘like’,
];
}

Here is full source code on github:

https://github.com/apiato/apiato/blob/9.0/app/Containers/User/Tasks/CreateUserByCredentialsTask.php

laravel_discuss-40008.jpg

2020-06-04 11:55:04
devmansurov 2020-06-02 21:24:33
How does a user create in a class when there is no method for creating a user in an extending class?

Class
CreateUserByCredentialsTask.php

<?php

namespace AppContainersUserTasks;

use AppContainersUserDataRepositoriesUserRepository;
use AppContainersUserModelsUser;
use AppShipExceptionsCreateResourceFailedException;
use AppShipParentsTasksTask;
use Exception;
use IlluminateSupportFacadesHash;

class CreateUserByCredentialsTask extends Task
{

protected $repository;

public function __construct(UserRepository $repository)
{
$this->repository = $repository;
}

public function run(
bool $isClient = true,
string $email,
string $password,
string $name = null,
string $gender = null,
string $birth = null
): User {

try {
$user = $this->repository->create([
‘password’ => Hash::make($password),
’email’ => $email,
‘name’ => $name,
‘gender’ => $gender,
‘birth’ => $birth,
‘is_client’ => $isClient,
]);

} catch (Exception $e) {
throw (new CreateResourceFailedException())->debug($e);
}

return $user;
}
}

——————————————————

Class UserRepository.php

<?php

namespace AppContainersUserDataRepositories;

use AppShipParentsRepositoriesRepository;

class UserRepository extends Repository
{
protected $fieldSearchable = [
‘name’ => ‘like’,
‘id’ => ‘=’,
’email’ => ‘=’,
‘confirmed’ => ‘=’,
‘created_at’ => ‘like’,
];
}

Here is full source code on github:

https://github.com/apiato/apiato/blob/9.0/app/Containers/User/Tasks/CreateUserByCredentialsTask.php

laravel_discuss-40007.jpg
i m getting error after running code above

2020-06-04 11:55:19
any help please
cayetanohosma 2020-06-04 12:16:24
Did you check if permissions is an array?
checkout this link https://laracasts.com/discuss/channels/laravel/syncing-permissions-with-spatie-permission

Syncing Permissions with Spatie PermissionLaracasts
Hey guys. I need a little help, I need to synchronize permissions when creating and editing a user within Administrator. I can give Sync in the roles,…
flyingdragons 2020-06-04 12:47:15
laksomphear 2020-06-04 07:22:49
Help me how to make real notification in laravel?

What kind of notifications your looking for? Slack, Database, Firebase?

2020-06-04 14:32:28
Hi, I’m new in laravel. I have a code, there I have to disable back button after log out.
2020-06-04 14:32:39
Please help
2020-06-04 14:34:29
How to securely in install laravel in elastic beanstalk
2020-06-04 14:35:58
*aws elastic beanstalk
Sumeet Jadhav 2020-06-04 14:43:47
Any tutorial for laravel firebase push notifications for android
prafulla_ranjan 2020-06-04 14:58:30
Hello everyone,

How i can redirect a user after login to subdomain? I am using default auth by laravel.

cayetanohosma 2020-06-04 15:24:57
Sumeet Jadhav 2020-06-04 14:43:47
Any tutorial for laravel firebase push notifications for android

If you find one, please share it here!

Sumeet Jadhav 2020-06-04 15:25:31
Ok
cayetanohosma 2020-06-04 15:26:17
prafulla_ranjan 2020-06-04 14:58:30
Hello everyone,

How i can redirect a user after login to subdomain? I am using default auth by laravel.

Did you try with response redirect, although probably you will must to modify the middleware in order to let you to change the subdomain

cayetanohosma 2020-06-04 15:26:45
That’s what you need at L4 & L5
prafulla_ranjan 2020-06-04 15:29:36
in RouteServiceProvider > can’t I just do like this ?

public const HOME = env(“MY_SUBDOMAIN_URL”)

prafulla_ranjan 2020-06-04 15:31:25
laravel_discuss-40029.jpg
I did like this and in login controller

it’s being called as

protected $redirectTo = RouteServiceProvider::HOME;

But i am getting error

prafulla_ranjan 2020-06-04 15:32:42
laravel_discuss-40030.jpg
can someone tell me what should be correct way ? or it’s all incorrect that i am doing? I am new.
Roham0010 2020-06-04 15:52:05
Hey guys I have a project and a relation hasMany project_incomes

Now I want to save an income for a project where is the best place to store this incomes of a project? in project controller and new method like newIncome or in income controller store method?
And what should be the url structure?
projects/{project_id}/incomes
or
incomes
and passing the project_id in form fields
?

devmansurov 2020-06-04 15:54:10
2020-06-04 11:55:04
i m getting error after running code above

Please show me error message Amon

DesolatorMagno 2020-06-04 15:56:34
You can make a new controller, project income.
Roham0010 2020-06-04 16:05:59
DesolatorMagno 2020-06-04 15:56:34
You can make a new controller, project income.

And how should be the routes?

DesolatorMagno 2020-06-04 16:07:58
You can use
Project/id/income/id
And use the resource way
DesolatorMagno 2020-06-04 16:08:17
/edit /create, etc.
Roham0010 2020-06-04 16:09:19
laravel_discuss-40038.jpg
previous routes was wrong this is what I have done
Roham0010 2020-06-04 16:09:55
DesolatorMagno 2020-06-04 16:07:58
You can use
Project/id/income/id
And use the resource way

ok thank you 👌🏻

DesolatorMagno 2020-06-04 16:11:25
You asked 2 question, I am telling you, you don’t need, or should, imo, put it in project or income controller, it should be ProjectIncomeController.
DesolatorMagno 2020-06-04 16:12:15
Think in a resource way, try to don’t use not standard methods.
DesolatorMagno 2020-06-04 16:13:53
That way you got more Intuitive names and shorter Controller.
Roham0010 2020-06-04 16:14:04
DesolatorMagno 2020-06-04 16:12:15
Think in a resource way, try to don’t use not standard methods.

Yeah that was why i asked thank you 👌🏻

Roham0010 2020-06-04 16:17:59
laravel_discuss-40044.jpg
This is the final routing
DesolatorMagno 2020-06-04 17:15:28
👍.
2020-06-04 17:28:01
Middleware not working in my case. May I wrote wrong
Rahul kumar 2020-06-04 17:50:26
Lumen session id changing on each request due to this I am not able to authenticate user
2020-06-04 19:16:06
Hey..
Can someone help me with some basics of working with the search, sort filter functionality..??
That displays results under a specified pagination..
2020-06-04 20:06:19
Guys do u know why laravel project says server failed when you try to download a file uploaded by users in your project?
m0lyna 2020-06-04 20:23:39
Hello, do you know any package for provinces and countries of Laravel?
hiteshv253 2020-06-04 20:28:49
2020-06-04 20:06:19
Guys do u know why laravel project says server failed when you try to download a file uploaded by users in your project?

may be it is path problem.

idigram 2020-06-04 21:10:07
I want to buy a host for my site, what do you think is the best host?
flyingdragons 2020-06-04 21:14:48
https://stackcoder.in/posts/firebase-cloud-messaging-fcm-browser-web-push-notifications-using-javascript-and-php
Firebase Cloud Messaging (FCM) Browser Web Push Notifications Using Javascript And PHP

Firebase Cloud Messaging (FCM) Browser Web Push Notifications Using Javascript And PHP | StackCoderStackCoder
Today you will learn a very interesting topic ie sending a notification to your blog followers or any subscribed users using Firebase Cloud Messaging using Javascript & PHP
flyingdragons 2020-06-04 21:15:30
Sumeet Jadhav 2020-06-04 14:43:47
Any tutorial for laravel firebase push notifications for android

I have written for PHP. But server side push will remain the same

flyingdragons 2020-06-04 21:15:49
Feel free to use the code. It’s hosted in GitHub too
Rahul kumar 2020-06-04 21:23:44
Lumen session id changing on each request due to this I am not able to authenticate user
idigram 2020-06-04 21:34:15
I want to buy a host for my site, what do you think is the best host?
DesolatorMagno 2020-06-04 21:36:58
Depende, it all come to what you will do with it, for a Laravel app you have DigitalOcean, for a WP smalish thing you can use bluehost.
Others surelly have theirs own idea of what to do.
idigram 2020-06-04 22:02:26
DesolatorMagno 2020-06-04 21:36:58
Depende, it all come to what you will do with it, for a Laravel app you have DigitalOcean, for a WP smalish thing you can use bluehost.
Others surelly have theirs own idea of what to do.

I want web hosting for Laravel so that the price is cheap and not expensive

flyingdragons 2020-06-04 22:20:39
idigram 2020-06-04 21:34:15
I want to buy a host for my site, what do you think is the best host?

Host you meant server? If yes then make sure to go for Digital Ocean, Linode, AWS, Vultr

flyingdragons 2020-06-04 22:21:58
idigram 2020-06-04 22:02:26
I want web hosting for Laravel so that the price is cheap and not expensive

Cheap means you can with CPanel deployments.

|