redroseamit

Member Since 8 Months Ago

Experience Points
10,470
Total
Experience

4,530 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
70
Lessons
Completed
Best Reply Awards
1
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

  • Community Pillar

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

Level 3
10,470 XP
Feb
06
2 months ago
Activity icon

Replied to Class 'RealRashid\SweetAlert\SweetAlertServiceProvider' Not Found

cache cleared ?

recheck 
in your config/app.php configuration file:

'providers' => [
    /*
    * Package Service Providers...
    */
    RealRashid\SweetAlert\SweetAlertServiceProvider::class,
],
Copy to clipboardErrorCopied
Also, add the Alert facade to the aliases array in your app configuration file:

'Alert' => RealRashid\SweetAlert\Facades\Alert::class,


Activity icon

Replied to Class 'RealRashid\SweetAlert\SweetAlertServiceProvider' Not Found

i guess you are missing that class in respective controller try to add ..

use  RealRashid\SweetAlert\SweetAlertServiceProvider ;

try to add class on your controller

Jan
26
2 months ago
Activity icon

Replied to Is It Possible Using Synch Uploaded File Stored In Storage And Send To The Mail.

sir what is the seen behind it .,,,

    #hashName: null
    path: "C:\xampp\tmp"
    filename: "php7E3B.tmp"
    basename: "php7E3B.tmp"
    pathname: "C:\xampp\tmp\php7E3B.tmp"
    extension: "tmp"
    realPath: false
    writable: false
    readable: false
    executable: false
    file: false
    dir: false
    link: false
  }
]

Activity icon

Replied to Is It Possible Using Synch Uploaded File Stored In Storage And Send To The Mail.

   public function build(Request $request)
   

  {
     
       //dd ($this->data['file']);

        $this->data['file']= $request->all();
         if($request->hasFile('file'))
         {
        $file = $request ->file('file');
        $fileName = $file->getClientOriginalName();
        $destinationPath = config('storage/app/image/').'/'.$fileName;
        $uploads = Storage::put($destinationPath,file_get_contents($file->getRealPath()));

          }
      
dd ($this->data['file']);

        return $this->from('[email protected]')
                    ->subject('New Estimate Enquiry received')
                    ->view('users.estimatetomail')

      
                    ->attachData($this->data['file']->getRealPath(),
        array(
                'as'=>'file.' . $this->data['file']->getClientOriginalName(),
                'mime' => $this->data['file']->getMimeType())
             )

                    ->with('data', $this->data);

             
    }

}


while i am doing dd

array:11 [▼
  "_token" => "Q4a9MPoJjVx8CeqSzr8pvPIUY1Rc7vLBGl3u9ENt"
  "name" => "amit"
  "email" => "[email protected]"
  "contact" => "hejdkfjd"
  "country" => "inhjh"
  "other" => "dfdfdf"
  "budget" => "000 - 000"
  "webdev" => "1"
  "marketing" => "1"
  "details" => "jhjhjhjhjh"
  "image" => Illuminate\Http\UploadedFile {#1330 ▼
    -test: false
    -originalName: "GAll.pdf"
    -mimeType: "application/pdf"
    -error: 0
    #hashName: null
    path: "C:\xampp\tmp"
    filename: "php7E3B.tmp"
    basename: "php7E3B.tmp"
    pathname: "C:\xampp\tmp\php7E3B.tmp"
    extension: "tmp"
    realPath: false
    writable: false
    readable: false
    executable: false
    file: false
    dir: false
    link: false
  }
]
Activity icon

Replied to Is It Possible Using Synch Uploaded File Stored In Storage And Send To The Mail.

sir i already try that but file is not sending to mail simultaneously..

Activity icon

Started a new Conversation Is It Possible Using Synch Uploaded File Stored In Storage And Send To The Mail.

while i will upload a file from frontend. file will be saved in storage folder and path will be saved in database and file send to the mail .??please answer. if possible please share some helpful reference.

Jan
25
2 months ago
Activity icon

Replied to File Does Not Exist Or Is Not Readable.attachment Sending Error. GetRealPath(),

@snapey sir please help me still not able to solve the error.

Jan
24
2 months ago
Activity icon

Replied to File Does Not Exist Or Is Not Readable.attachment Sending Error. GetRealPath(),

Symfony\Component\HttpFoundation\File\Exception\FileException
The file "MinuetInGAll.pdf" was not uploaded due to an unknown error. 

sir getting this error..

Activity icon

Replied to Call To A Member Function GetRealPath() On Null.

@aleksandrov_l sir how to reduce this error php297A.tmp" file does not exist or is not readable.

Jan
23
2 months ago
Activity icon

Awarded Best Reply on How To Remove Filename.php Part From Url And Get Parameter ? ( PHP Native )

you can use .htaccess file to hide any thing.

Activity icon

Replied to How To Remove Filename.php Part From Url And Get Parameter ? ( PHP Native )

you can use .htaccess file to hide any thing.

Activity icon

Started a new Conversation File Does Not Exist Or Is Not Readable.attachment Sending Error. GetRealPath(),

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')
                    ->view('users.estimatetomail')

          
                    ->attach($this->data['file']->getRealPath(),
        array(
                'as'=>'file.' . $this->data['file']->getClientOriginalName(),
                'mime' => $this->data['file']->getMimeType())
             )

                    ->with('data', $this->data);


    }

}

Activity icon

Replied to Call To A Member Function GetRealPath() On Null.

thanks you so much sir thanks a lot ...its working now .... one more error is left there its storing temp file that is unable to read,

Activity icon

Replied to Call To A Member Function GetRealPath() On Null.

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

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->from('[email protected]')
                    ->subject('New data received')
                    ->view('users.estimatetomail')
                    // ->attach($this->data['file']->getRealPath(),
                
                    // [
                    // 'as' => $this->data['file']->getClientOriginalName(),
                    // 'mime' => $this->data['file']->getClientMimeType(),
                    // ])

                    ->attach($data['file']->getRealPath(), array(
                'as'=>'file.' . $data['file']->getClientOriginalName(),
                'mime' => $data['file']->getMimeType())
             )


                    ->with('data', $this->data);



    }

again its throwing error undefined variable data

Activity icon

Replied to Call To A Member Function GetRealPath() On Null.

<div class="form-row-fluid ml-0 py-2">
                    <div class="form-group">
                 <label><strong>file </strong></label>
                <input type="file" name="file" value="{{ $data['file'] }}" > 
                    </div>
                </div>

sir now it is showing ...undefined variable data error.. where i have to assign data variable ?

   public function build()
    {
        return $this->from('[email protected]')
                    ->subject('New Enquiry received')
                    ->view('users.estimatetomail')
                    // ->attach($this->data['file']->getRealPath(),
                
                    // [
                    // 'as' => $this->data['file']->getClientOriginalName(),
                    // 'mime' => $this->data['file']->getClientMimeType(),
                    // ])
                    ->attach($data['file']->getRealPath(), array(
                    'as'=>'file.' . $data['file']->getClientOriginalName(),
                    'mime' => $data['file']->getMimeType())
             )
                                  



                    ->with('data', $this->data);



    }

Activity icon

Replied to Call To A Member Function GetRealPath() On Null.

sir its still same error...

Activity icon

Replied to Call To A Member Function GetRealPath() On Null.

sir i did very long research on it..spend more then 5 hours even read around every post but not able to solve it..it would be great if you answer me.

Jan
22
2 months ago
Activity icon

Started a new Conversation Call To A Member Function GetRealPath() On Null.

unable to attach document to the mail please help me.here is my controller

   public function build()
    {
        return $this->from('[email protected]')
                    ->subject('New Estimate Enquiry received')
                    ->view('users.estimatetomail')
                    ->attach($this->data['file']->getRealPath(),
                
                    [
                    'as' => $this->data['file']->getClientOriginalName(),
                    'mime' => $this->data['file']->getClientMimeType(),
                    ])
                    ->with('data', $this->data);

    }

sending request through this

 $data = array(

            'details'=>$request->details,
            'file'=>$request->file

        );



     Mail::to('[email protected]')->send(new SendMail($data));

        $notification = array(
        'message' => ' Estimate submitted successfully', 
        'alert-type' => 'success'
        );

        return view ('users.thanks')->with($notification);

Activity icon

Replied to Laravel Selected Dropdown Value When Edit

try


 @foreach($group as $avocat)
  
  



<div class="form-group col-md-6">
                        <label > Wilaya </label>
                        <select  class="form-control" name = "avocat_wilaya" id="avocat_wilaya" >
                            <option selected>{{$avocat->example1}}</option>
                             <option selected>{{$avocat->examle2}}</option>
             
                        </select>
                    </div>
                </div>
   @endforeach 

Activity icon

Started a new Conversation How To Send Attachment File To The Mail .only Subject Is Receiving

Mail::send('index', [
                'name' => $request->get('name'),
                'email' => $request->get('email'),
                'file'=>  $request->get('file'),
                'contact' => $request->get('contact') ],
                function ($message) {
                        $message->from('[email protected]');
                        $message->to('[email protected]', 'System')
                        ->subject('New Estimate Received '); 

Jan
21
2 months ago
Activity icon

Replied to Unlink(storage/app/image/20201225130625.png): No Such File Or Directory

sir its hidden ...because of .htaccess..... is it good practice or i have to do something more..

Jan
20
2 months ago
Activity icon

Replied to Unlink(storage/app/image/20201225130625.png): No Such File Or Directory

no sir i did not made any changes there i can share my htaccess file ...some days ago i asked a question but no one reply me sir ...so sir i found this code added to ,htacces for directly access public folder with url . ...


<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^ [N]

RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
RewriteRule ^(.*)$ public/ 

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ server.php

so sir now i guess ...i have to add that path. is it correct? should i need to give public path ?

unlink("public/storage/app/image/".$old_image);

Activity icon

Replied to Unlink(storage/app/image/20201225130625.png): No Such File Or Directory

sir i did not made any change on index.php . i just used .htacess ....sir my code is here .its already complete path ...it seems image is also not uploading to the server,,,,sir i want to know why its working on xammp or not working on cpanel....

this is for unlink

unlink("storage/app/image/".$old_image);

this is for the upload

$files->move('storage/app/image/', $image = date('YmdHis').'.'.$files->getClientOriginalExtension());
Activity icon

Replied to Unlink(storage/app/image/20201225130625.png): No Such File Or Directory

but sir its working proper in my xammp server....i deployed target app to cpanel then this error getting.

Activity icon

Started a new Conversation Unlink(storage/app/image/20201225130625.png): No Such File Or Directory

in local machine everything is working but in cpanel this error is showing while deleting any id item.

Jan
18
2 months ago
Activity icon

Awarded Best Reply on Payment Failed. Security Header Is Not Valid

solved ... testing mode enable need to be disable.

Activity icon

Replied to Payment Failed. Security Header Is Not Valid

solved ... testing mode enable need to be disable.

Activity icon

Started a new Conversation Payment Failed. Security Header Is Not Valid

i am using paypal payment gateway... getting this error.. already checked api with below form.api is working,

<form method="post" action="https://api-3t.paypal.com/nvp">
API Username: <input type="text" name="USER" value="uk-3xxxx">  <br>
API Password: <input type="text" name="PWD" value="D25xxxxx">  <br>
API Signature: <input type="text" name="SIGNATURE" value="A7yWAlFxxxx">  <br>
Version: <input type="text" name="VERSION" value="204"> <br>
Paymentaction: <input type="text" name="PAYMENTREQUEST_0_PAYMENTACTION" value="sale"> <br>
Amount: <input type="text" name="PAYMENTREQUEST_0_AMT" value="7.50"> <br>
Item Amount: <input type="text" name="PAYMENTREQUEST_0_ITEMAMT" value="7.50"> <br>
Currency: <input type="text" name="PAYMENTREQUEST_0_CURRENCYCODE" value="USD"> <br>
ReturnURL: <input type="text" name="returnUrl" value="http://www.mywebsite.com/success.html"> <br>
CancelURL: <input type="text" name="cancelUrl" value="http://www.mywebsite.com/cancel.html"> <br>
SolutionType: <input type="text" name="solutiontype" value="Sole"> <br>
<br>
<input type="submit" name="METHOD" value="SetExpressCheckout"> <br>
</form>
Jan
14
3 months ago
Activity icon

Awarded Best Reply on Invalid Exception Returned From Guzzle6

solved

Activity icon

Started a new Conversation Invalid Exception Returned From Guzzle6

Problem 1 - php-http/guzzle6-adapter v1.1.1 requires guzzlehttp/guzzle ^6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.2). - league/omnipay v3.0.0 requires php-http/guzzle6-adapter ^1.1 -> satisfiable by php-http/guzzle6-adapter[v1.1.1]. - league/omnipay is locked to version v3.0.0 and an update of this package was not requested.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Jan
13
3 months ago
Activity icon

Started a new Conversation How To Pass Form Amount Value Using Srmklive Package....

here is the package ...https://laravelpackages.net/srmklive/paypal

 <form role="form" action="{{ route('users.payment.paypal.process') }}" method="post">
     <div class="row">
                            <div class="col-xs-12">
              <button class="btn btn-primary btn-lg btn-block" type="submit">Pay Now {{ $data['amount'] }} $</button>
                            </div>
                        </div>
                          
                    </form>

Activity icon

Replied to Undefined Variable: Provider .....getting Error While Using Srmklive Package For Paypal .

sir this error is gone while i am using

$provider = new ExpressCheckout;

sir could you please guide me how i can proceed payment through this form ...using same package ...

here is the view


                        <form >

                        <div class="row">
                            <div class="col-xs-12">
              <button class="btn btn-primary btn-lg btn-block" type="submit">Pay Now {{ $data['amount'] }} $</button>
                            </div>
                        </div>
                          
                    </form>
Activity icon

Started a new Conversation Undefined Variable: Provider .....getting Error While Using Srmklive Package For Paypal .

public function paypal()

    {

        $data = [];

        $data['items'] = [

            [

                'name' => 'payment',

                'price' => 100,

                'desc'  => 'Description',

                'qty' => 1

            ]

        ];

  

        $data['invoice_id'] = 1;

        $data['invoice_description'] = "Order #{$data['invoice_id']} Invoice";

        $data['return_url'] = route('users.payment.paypal.success');

        $data['cancel_url'] = route('users.payment.paypalc.cancel');

        $data['total'] = 100;




        

        $provider = new ExpressCheckout;

  

        $response = $provider->setExpressCheckout($data);

  

        $response = $provider->setExpressCheckout($data, true);

  

        return redirect($response['paypal_link']);

    }

   

    /**

     * Responds with a welcome message with instructions

     *

     * @return \Illuminate\Http\Response

     */

    public function cancel()

    {

        dd('payment cancel try again.');
 
    }

  

    /**

     * Responds with a welcome message with instructions

     *

     * @return \Illuminate\Http\Response

     */

    public function success(Request $request)

    {
        
        $response = $provider->getExpressCheckoutDetails($request->token);

  

        if (in_array(strtoupper($response['ACK']), ['SUCCESS', 'SUCCESSWITHWARNING'])) {

            dd('Your payment was successfully proceed');

        }

  

        dd('Something is wrong.');

    }

}

Jan
12
3 months ago
Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

thanks sir i know that ...i already hide env file using htacess.

Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

thanks sir now its working ... that was correct i don't need to do anything in mail.php..... instead of password its gmail is creating a app password ....now its worked.



Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

sir i am getting error only...Expected response code 220 but got an empty response

Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

same error ..above two i am getting..

Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

sorry sir ts not parameter it was my gmail account so i type XXXXX

Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

sir it was correct i also forgot to enable that one..now i enabled it...but still the error is same

Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

i did it already ..then only given two above errors.

Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

its same as i am using.

Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

sir i already did.....but still getting above error i tried both and less secure app is enable in gmail account.

Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

here is the env file

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=<<<<XXXXXXXXXXXXXxx>>>>
MAIL_PASSWORD=<<<<gmail app code >>>>>
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=null

and this is mail

    'default' => env('MAIL_MAILER', 'smtp'),

'mailers' => [
        'smtp' => [
            'transport' => 'smtp',
            'host' => env('MAIL_HOST', 'smtp.gmail.com'),
            'port' => env('MAIL_PORT', 587),
            'encryption' => env('MAIL_ENCRYPTION', 'tls'),
            'username' => env('XXXXXXXXXXXXX'),
            'password' => env('XXXXXXXXXXX'),
            'timeout' => null,
            'auth_mode' => null,
        ],


Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

no it is diffrent ... here is the env file

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=<<<<XXXXXXXXXXXXXxx>>>>
MAIL_PASSWORD=<<<<gmail app code >>>>>
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=null

and this is mail

    'default' => env('MAIL_MAILER', 'smtp'),

'mailers' => [
        'smtp' => [
            'transport' => 'smtp',
            'host' => env('MAIL_HOST', 'smtp.gmail.com'),
            'port' => env('MAIL_PORT', 587),
            'encryption' => env('MAIL_ENCRYPTION', 'tls'),
            'username' => env('XXXXXXXXXXXXX'),
            'password' => env('XXXXXXXXXXX'),
            'timeout' => null,
            'auth_mode' => null,
        ],


Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

sorry sir i am not getting you ...smtp there are lot of smtp ...mailtrap.io was working fine previously.

Activity icon

Replied to Mail Sending Error Using Gmail Smtp Using Laravel

yes mailtrap is working fine.