mDelshad

mDelshad

Member Since 5 Months Ago

Experience Points 3,080
Experience Level 1

1,920 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 0
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

19 Feb
3 days ago

mDelshad started a new conversation Send Alert When Failed Login

How to send alert by email whenever failed login?

17 Feb
5 days ago

mDelshad left a reply on Show Data In Modal

@BOBBYBOUWMANN - thank you The modal must display the user's name along with other information There are also two buttons that each send a request to a different route I'm making a modal, but I do not know how to display the info of any item (Unfortunately, I'm very rushing and I do not have the opportunity to watch a training)

mDelshad started a new conversation Show Data In Modal

Suppose we have a table that has many items and each item has a button to edit I want the item's info to be displayed in a modal when clicked on How do you do this with jQuery or vuejs?

mDelshad started a new conversation Get The Latest Changes From Github

i'm using a laravel starter project in github now I want to update my project (in my system) with the latest changes in the project's repository in GitHub Can i do this?

mDelshad started a new conversation 'php' Is Not Recognized As An Internal

when i iafter nstall heroku, and write this command in cmd 'php' is not recognized as an internal returned

16 Feb
6 days ago

mDelshad started a new conversation Check User Has Row

How can I check, the user has a row in this table or not

15 Feb
1 week ago

mDelshad started a new conversation Error On Save Data

i'm using repository pattern but in save data getting this error:

Function () does not exist

this is Document Repository :


namespace App\Repositories\system\Document;

use App\Models\Document\Document;
use App\Repositories\BaseRepository;

class DocumentRepository extends BaseRepository
{
    /**
     * @return string
     */
    public function model()
    {
        return Document::class;
    }



        /**
     * @param array $data
     *
     * @return \Illuminate\Database\Eloquent\Model|mixed
     * @throws \Exception
     * @throws \Throwable
     */
    public function sendDoc(array $data)
    {
        foreach ($data as $key => $value) {
            $input[$key] = $value->storeAs(
                'documents/'.CurrentUser()->path  , str_random(80).'.'. $value->getClientOriginalExtension()
            );
        }


        return DB::transaction(function () use ($input) {
            $document = parent::create([
                'id_card'        => $input['National_Card'],
                'bank_card'         => $input['Bank_card'],
                'selfie'             => $input['Selfie'],
                'verify'            => '1',
                ]);
                return  $document;
        });
      
    }


}

and this in controller

<?php

namespace App\Http\Controllers\frontend\user;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Repositories\system\Document\DocumentRepository;
use App\Http\Requests\system\DocumentRequest;
class DocumentController extends Controller
{

    /**
     * @var documentRepository
     */
    protected $documentRepository;

    /**
     * DocumentController constructor.
     *
     * @param DocumentRepository $DocumentRepository
     */
    public function __construct(DocumentRepository $documentRepository)
    {
        $this->documentRepository = $documentRepository;
    }

    public function sendDoc(DocumentRequest $request)
    {

      $document =  $this->documentRepository->sendDoc(
            $request->only('National_Card','Bank_card','Selfie')
        );
        return redirect()->route('frontend.user.account')->withFlashSuccess("Message"); 
    }
}

14 Feb
1 week ago

mDelshad started a new conversation Upload Files In RepositoryPttern

i send files to userRepository with this code :

    public function sendDocs(Request $request)
    {
        $this->userRepository->sendDocs(
            $request->only('National_Card','Bank_card','Selfie')
        );

    }

and this is sendDocsfunction in userRepository

public function sendDoc(array $data)
    {
        dd($data);
    }

now how i can upload and save files is table with Repository pattern

mDelshad started a new conversation Best Relationship For User's Files

Each user has many files and each file belongs to one user. I also save the file type (i'm add a field to table => file_type => for example : free or vip)

Now I think I have to use One To Many, What do you think?

13 Feb
1 week ago

mDelshad left a reply on Public And Private Visibility In Storage

@TECHGURU - for example in this code :

Storage::put('file.jpg', $contents, 'public');

If instead of public , Write private what will happen??

Maybe my question is very obscure... Can you Explain to me what is "File Visibility" , with a example?

mDelshad started a new conversation Public And Private Visibility In Storage

What is the difference between private and public in visibility? Because I tested both and accessed the file in both cases

mDelshad left a reply on How To Access A File In The Local Disk?

@SNAPEY - i want just admin accesses to files, Should I use public?

12 Feb
1 week ago

mDelshad started a new conversation How To Access A File In The Local Disk?

i'm upload images with this code:

$path = $request->file('image')->store('documents');

and i can get file address with return $path

but when i open the link in browser, error 404 displayed

The image is uploaded correctly! I also executed this command php artisan storage:link

but in public folder and this directory storage just avatar folder has been created , But the folder documents will not be created

mDelshad left a reply on Create Pivot Table For One To Many Relationship

@SERGIU17 - What is your solution, bro?

mDelshad left a reply on Create Pivot Table For One To Many Relationship

@VILFAGO - Can it be done on a table?

id 
user_id
type  => is this id card or bank card and or salafie
link => image location
verify => whether it is approved or not
description

yes , For example, a user can upload a lot of national cards, but if the first national card to be sent is confirmed No longer allowed to send a new national card

mDelshad left a reply on Create Pivot Table For One To Many Relationship

@SERGIU17 - @v I wanted to do this, but I thought the wrong way : I have a form that has 3 inputs for uploading a photo First image for national card Second order for a bank card And the third image for Salafi I want to save this in the document table, But I do not know what the structure of the document table is like, what's the relationship with the user's table You can help me because I've been involved in this section for a few days and I can not do it

mDelshad started a new conversation Create Pivot Table For One To Many Relationship

Can i create pivot table for One To Many Relationship?

mDelshad left a reply on Difference Between Local And Public Drivers

@SHEZ1983 - So, in your opinion, it is better to use local than to store user documents(id card...passport and...).

you have to write a script that can get to that directory : How to get access??

mDelshad started a new conversation Difference Between Local And Public Drivers

What is the difference between local and public drivers For example, which item is better if I want to save user invoices or documents

11 Feb
1 week ago

mDelshad started a new conversation Upload Multiple Images

In the form, I take 3 pictures of the user to upload and I want every image to be saved in a separate row in table please help thanaks

mDelshad started a new conversation Implementing Service Requirements

My users for the service order must complete the authentication of their documents and their phone numbers At present, a service may not need a certificate, and only confirmation of a mobile number is necessary for it, or do not need to be authenticated at all. How can I implement these?

10 Feb
1 week ago

mDelshad left a reply on Handling The Error Is A Unique

@TYKUS - Thank you so much :) fixed I am currently developing the system and will have a lot of users when it finishes

mDelshad left a reply on Handling The Error Is A Unique

@TYKUS - very thanks but I'm sorry, because there's another problem. I have only one user. When I edit the user without changing the information, it says again that the phone number has already been used.

mDelshad left a reply on Handling The Error Is A Unique

@TYKUS - thanks, if i create a form request, Is this code correct?

    public function rules()
    {
        return [
            'phone_number'  => ['required', 'max:11',Rule::unique('users')->ignore($this->user->id)],
        ];
    }

mDelshad left a reply on Handling The Error Is A Unique

@TYKUS - bro this error displayed:

Class 'App\Http\Controllers\Frontend\User\Rule' not found
09 Feb
1 week ago

mDelshad left a reply on Handling The Error Is A Unique

@TYKUS - for example, i have national code fields in user's table and it is first encrypted and then stored in the database, Now that the user registers, I can not use the Rulebecause the information is stored in the database as encrypted.

mDelshad left a reply on Handling The Error Is A Unique

@TYKUS - Thanks, and if my value is encrypted how can I do this

mDelshad started a new conversation Handling The Error Is A Unique

I do not want to show this page

https://screenshots.firefox.com/Xq13G7BYFXbPO34C/127.0.0.1

I want to display a flash message on the edit page

08 Feb
2 weeks ago

mDelshad left a reply on Display Encrypted Values

@SNAPEY - thank you You can introduce a comprehensive package

mDelshad left a reply on Display Encrypted Values

@SNAPEY - I have no problem to decrypting data, The problem is that Spatie html does not have value attribute...This package itself adds the value attribute to the input

mDelshad left a reply on Display Encrypted Values

@SNAPEY - I apologize if I did not understand your meaning properly... i'm using laravel boilerplate(starter project) and it using spatie html for forms now i'm created a form with spatie html for user information and I encrypt this information and then store it in the database..

in spatie html i don't need add value , for example : value="{{$user->national_code}}" attribut. now Now my problem is that when the edit form opens, the encrypted data stored in the database is displayed in the fields.

mDelshad started a new conversation Display Encrypted Values

i'm using spatie html and my data is encrypted. in edit form how i can decrypte data and show value??

mDelshad started a new conversation Create Service With Custom Fields

I want the manager to add new services to his site that can create different fields in creating it How should the structure of the table and how to store the field information?

07 Feb
2 weeks ago

mDelshad started a new conversation Process Of Currency Exchange

Maybe this site is not suitable for this community, but I'm grateful if you help me To transfer digital currencies, api wallets are used How is the currency exchange process done? That is, the user who intends to buy or sell his currency, such as Bitcoin or WebMoney, after entering the Bitcoin email address or his Webmaster ID and registering a currency purchase or sale application, How should this process be done?

03 Feb
2 weeks ago

mDelshad left a reply on Identity National Id And....

@SNAPEY - How can I encrypt data that can be retrieved?

mDelshad left a reply on Identity National Id And....

@SNAPEY - Thanks bro Is this structure suitable for migration?

Document
 -id
 -user_id
 -doc_type
 -link
 -verify
 -desc

What should be the relationship with the user table?

mDelshad started a new conversation Create Secure Directory

how i can create secure dicrectory i can not use laravel's storage because my customer dont have access to ssh for run '''storage:link'''

mDelshad started a new conversation Identity National Id And....

What structure do you recommend for migration to confirm the documents (national id , driving license , passport)?

30 Jan
3 weeks ago

mDelshad left a reply on Problem This Storage:link In Shared Hosting

@JKENYON - Do you mean hosting company or host type, such as cpanel??

mDelshad left a reply on Problem This Storage:link In Shared Hosting

@jkenyon @ty thanks The way I said it can not be done?

mDelshad started a new conversation Problem This Storage:link In Shared Hosting

i'm use the Shared hosting and because i'm do not have access to ssh , can not run the following command

php artisan storage:link

Can this command be done locally and then upload the project to the host?

24 Jan
4 weeks ago

mDelshad started a new conversation Problem In Save Data

this function is for send code. The code is sent, but dont saved phone number and code in User's table

    public function SendCode(Request $request){
        $code = rand(11111,99999);
        $phone = $request->phone;
        $user = Auth::user();
        $user->update([
            'phone'=>$phone,
            'phone_code'=>$code
            ]);
        Sms::via('kavenegar')->send("your code: ".$code)->to($phone)->dispatch();
        return back();
    }
23 Jan
4 weeks ago

mDelshad left a reply on Error In Show Component

@AURAWINDSURFING - I did these things but my problem was not resolved

mDelshad left a reply on Error In Show Component

@AURAWINDSURFING - @realrandyallen @aurawindsurfing -now this error displayed

[Vue warn]: Unknown custom element: <example-component> - did you register the component correctly? For recursive components, make sure to provide the "name" option. (found in <Root>)