skoobi

skoobi

Ceredigion

Member Since 4 Years Ago

Experience Points 33,470
Experience
Level
Lessons Completed 231
Lessons
Completed
Best Reply Awards 7
Best Answer
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.

11 Dec
1 day ago

skoobi left a reply on SHARED HOSTING PLESK + LARAVEL

The only thing I can think of is the ports. If your using SMTP on an insecure network then it's 25 or if it's secure it's 465 or 463 also try the encryption to tls

skoobi left a reply on SHARED HOSTING PLESK + LARAVEL

The mail host is normally something like

mail.domain.com

So in pleas when you setup a new email account you should be able to find the settings to setup that email address

05 Dec
1 week ago

skoobi left a reply on So, How Exactly Do You Get JQuery From Webpack To Work With Blade?

If it’s already compiled the you use

Or whatever the path to the app.js is

03 Dec
1 week ago

skoobi left a reply on Do "something" Once A Day In Laravel

If you get in touch with heroku support, they’re pretty good and can sort it out for you. But youll need a paid plan

skoobi started a new conversation Search For With Array But If Nothing Return All

Hi. I’m trying to get a filter running for a mass mailer that has multiple checkboxes, for example , all, pending, active etc. What I’m trying to get working is the return all if value is set to all.

What’s the best way of writing this. I’m using traits on the user model

Cheers

01 Dec
1 week ago

skoobi left a reply on Mail Not Sending Cc

Cheers for the reply. Hmm. Ye tried all them and nothing. Not quite sure what too do with it other than set another Mail::to to the 2nd email. If I use ->bcc() it sends 2 copies to the original user and ignores the addresses in the bcc. Strange. I'll be pushing the project up to the testing server in the morning, so may give it a shot to see its the localhost or something.

Cheers

skoobi left a reply on Php-cs-fixer Help

Cheers for the reply. I gave that a shot but it didn't do anything. Im not sure whats going on there. Ill give it another try in the morning just in case! Heres what I have in my .phpcsfixer

return PhpCsFixer\Config::create()
->setRules([
    '@PSR2' => true,
    'array_syntax' => ['syntax' => 'short'],
    'no_unused_imports' => true,
    'ordered_imports' => ['sort_algorithm' => 'alpha'],
    'blank_line_before_statement' => ['if']
])

skoobi started a new conversation Php-cs-fixer Help

Hi.

I have got Php-cs-fixer up and running and its doing its thing, but I want it to automatically add a line above and below if else statements, i.e::

// from this 

if ($payment_type == 1) { // New Account
    $update_duration = $this->updateDuration($user, $duration);
    $update_balance = CustomerCreditBalance::where('user_id', $user->id)->update(['current' => 20 - ($balance_transaction->fee / 100),]);
    $account = CustomerAccount::where('user_id', $user->id)->update(['status_id' => 3]);
    $payment = Ledgers::save($user, $transaction_type, $cost, $charge->id, null, $payment_title . ' - ' . $user->username, null, null, 5, $balance_transaction->fee / 100, 'Stripe');
    event(new AccountSetupComplete($user, $payment));
} elseif ($payment_type == 2) {   // Renewal 2-3

// To this

if ($payment_type == 1) { // New Account

    $update_duration = $this->updateDuration($user, $duration);
    $update_balance = CustomerCreditBalance::where('user_id', $user->id)->update(['current' => 20 - ($balance_transaction->fee / 100),]);
    $account = CustomerAccount::where('user_id', $user->id)->update(['status_id' => 3]);
    $payment = Ledgers::save($user, $transaction_type, $cost, $charge->id, null, $payment_title . ' - ' . $user->username, null, null, 5, $balance_transaction->fee / 100, 'Stripe');
    event(new AccountSetupComplete($user, $payment));

} elseif ($payment_type == 2) {   // Renewal 2-3

Any ideas on how to do it. I can seem to find the settings in the docs.

Cheers

skoobi started a new conversation Mail Not Sending Cc

Hi. Im trying to add cc to the Mail::to() and for some reason (probably me) its not working.

Mail::to($event->user->email)->cc('[email protected]')->send(new AccountRenewalEmail($event->user, $mailcentre, $payment));

It sends to the user but not the cc, an ideas?

Many thanks

29 Nov
1 week ago

skoobi left a reply on Integrity Constraint Violation: 1048 Column 'category_id' Cannot Be Null (SQL: Insert Into `posts`

I didn’t spot that on my phone lol. I knew it was something not being passed through.

skoobi left a reply on Integrity Constraint Violation: 1048 Column 'category_id' Cannot Be Null (SQL: Insert Into `posts`

Have you dd($request->all()) the request to see what it’s outputting. If I your getting an error saying it can’t be null then It’s not passing through the category, so you need to check that.

If your not expecting the category to be selected or to have any data passed then you need to setup the database column to allow null. So in the migration

$table->integer(‘category_id’)->nullable();

skoobi left a reply on Validation In Controller

When you say the validation fails, do you get an error or does it just redirect back with nothing.

If it’s redirected back with nothing, have you got the errors being displayed like so: ‘’’ @if ($errors->any())

@endif ‘’’

skoobi left a reply on Integrity Constraint Violation: 1048 Column 'category_id' Cannot Be Null (SQL: Insert Into `posts`

Is the form passing the $request->category_id correctly.

It looks like there’s no value being passed.

skoobi left a reply on Project Wont Load Files In Public

Have you checked the .env file to make sure it’s all the same. If your using the env_url and it’s different in either env files then it may point to the wrong location. Also how are you calling the app.js and app.css

skoobi left a reply on Laravel Date Comparison

Im an idiot!!!!

Theres a very good reason it wasn't working as expected...

Changed the disable to disabled :) ... I want to cry.

<input type="submit" value="GO TO MY SHOPPING BASKET" @if($expiry <= \Carbon\Carbon::today()->addDays(7)) disabled @endif >

skoobi left a reply on Laravel Date Comparison

Just check the values and they're correct. Ive been pulling my hair out on this thinking it was the query I was asking, but seems its something else. Ill see if I can dig a bit deeper and figure it out.

Cheers

skoobi left a reply on Laravel Date Comparison

Hmm... I tried that as well and that didn't work either... Im going to have to look at the code and see what the heck going on!!! Or leave it as a bug for later :)

skoobi left a reply on Laravel Date Comparison

Thank you but unfortunately that didn't work... It just keeps showing!!!

Heres the dates ::

$expiry = 2018-12-05; // Should enable the button as its pithing 7 days of today
$expiry = 2018-12-07; // Should disable as its 8 days away

// Its parsed by carbon so I can use methods on the variable i.e. $expiry->addDays(7)

I just can't figure out whats going on!!

skoobi started a new conversation Laravel Date Comparison

Hi. For some reason my head wants to explode every time I get to this, and for some reason I just can't figure it out out even though its pretty straight forwards.

Im using Carbon for the dates and what I am trying to do is enable and disable a button in blade depending if the customers expiry date is due (within 7 days) or not.

So my logic is that I need to check that the $expiry is after Carbon::today()!!!

So in code it is ::

@if($expiry >= \Carbon\Carbon::today()->subDays(7)) disable @endif

But this doesn't disable the button!

Any ideas ?

many thanks

skoobi left a reply on I Cant Use Homestead

Paste your homestead.yaml here.

Also check you have typed it correctly in your homestead file and also make sure the spacing is correct in the gutter.

28 Nov
2 weeks ago

skoobi left a reply on Valet, PHP Installation Appears To Be Missing The MySQL Extension

Ah if you dig around, there is a fix for the Mojave issue. I had the same issue but found a solution. I’ll see if I can find it for you in the morning

skoobi left a reply on Valet, PHP Installation Appears To Be Missing The MySQL Extension

Hmm. I just checked through the Brew commands and you could try brew upgrade php and see what that comes up with. Or brew doctor to see if theres any issues with it

27 Nov
2 weeks ago

skoobi left a reply on Valet, PHP Installation Appears To Be Missing The MySQL Extension

Youll have to look it up a bit further but this may help put you on the right track. If Mysql is missing then you may be able to reinstall php with the extension​, or reinstall php

brew reinstall php72 --with-libmysql

skoobi left a reply on Confused On Laravel And/or Homestead Pathing...

Have you set the domain in the host file and Homestead.yaml?

Have you taken a look at the Laravel from scratch tutorial, It will show you how to set it all up. Can't remember if he uses Homstead or Valet but definetly worth a look.

https://laracasts.com/series/laravel-from-scratch-2018

skoobi left a reply on Sending Variables To Controller From Vue Component

Hi @mithrandir. I had tried that originally but must have mistyped something, but that worked perfectly, Thank you

skoobi started a new conversation Sending Variables To Controller From Vue Component

Hi. Im trying to send variables over to a Payments Controller along with the paypal transaction ID but if I send the paypal Id it wont post the other variables, but if i dont send the paypal id then it will. Any help would be greatful.

            onAuthorize: function(data, actions) {
                    return actions.payment.execute().then(function() {
                        axios.post('/api/v1/customers/pricing/make-paypal-payment/', data.paymentID, self.cost, self.duration, self.payment_title, self.payment_type)
                        .then(response => {
                            if(self.duration == 1){
                                window.location = '/control-panel/#id-verification';
                            } else {
                                window.location = '/control-panel/#account';
                            }
                        })
                        .catch(error => {
                            window.location = '/payments';
                        });
                    });
                },

skoobi started a new conversation Using .env Key In Vue

Hi. I'm building a PayPal checkout component but it keeps failing when I try to import the .env key.

I've resorted to hardcoding it into the Vue component for testing as it works but I want to add it as a .env key.

I've tried to use MIX_PAYPAL_CLIENT_ID in the .env and then use it with process.env.MIX_PAYPAL_CLIENT_ID, in the Vue component, but this fails every time​ even after running `npm run d.

Any ideas?

Many thanks Heres the code ::

<template>
    <div class="">
        <div class="row" style="margin-top:0px; padding-top:0px;">
            <div class="center" style="margin-top:0px; padding-top:0px;">
                <div id="paypal-button"></div>
            </div>
        </div>
    </div>
</template>

<script>

export default {
    components: {

    },

    mounted() {
        //
    },

    data() {
        return {
            paypal_mode: process.env.MIX_PAYPAL_MODE,
            client_id: process.env.MIX_PAYPAL_CLIENT_ID,
            production_client_id: process.env.MIX_PAYPAL_PRODUCTION_ID,
            cost: App.cost,
            duration: App.duration,
            payment_title: App.payment_title,
            payment_type: App.payment_type,
        }
    },

    created(){
        this.loadPaypal();
    },

    methods: {

        loadPaypal(){
            var self = this;
            paypal.Button.render({

                // Configure environment
                env: self.paypal_mode,
                client: {
                    sandbox: self.client_id,
                    production: self.production_client_id
                },
                // Customize button (optional)
                locale: 'en_US',
                style: {
                    size: 'medium',
                    color: 'gold',
                    shape: 'rect'
                },

                // Enable Pay Now checkout flow (optional)
                commit: true,

                // Set up a payment
                payment: function(data, actions) {
                    return actions.payment.create({
                        transactions: [{
                            amount: {
                                total: self.cost,
                                currency: 'GBP',
                                details: {
                                    subtotal: self.cost,
                                }
                            },
                            description: self.payment_title
                        }]
                    });
                },
                // Execute the payment
                onAuthorize: function(data, actions) {
                    return actions.payment.execute().then(function() {
                        // window.alert('Thank you for your purchase!');
                        axios.post('/api/v1/customers/pricing/make-paypal-payment/', self.$data, self.cost, self.duration, self.payment_title, self.payment_type)
                        .then(response => {
                            if(self.duration == 1){
                                window.location = '/control-panel/#id-verification';
                            } else {
                                window.location = '/control-panel/#account';
                            }
                        })
                        .catch(error => {
                            window.location = '/payments';
                        });
                    });
                },
                onError: function (err) {
                    axios.post('/api/v1/customers/pricing/paypal-error/', self.err)
                }
            }, '#paypal-button');
        },

    }
};


</script>
26 Nov
2 weeks ago

skoobi left a reply on Laravel Array From Paypal Rest API

Thank you very much for your reply. Your right. I completely missed the [ ] object...

Thank you for your help @real

skoobi started a new conversation Laravel Array From Paypal Rest API

Hi.

Im struggling to get the data out of the Returned data from Paypal Api..

When a payment is made all is ok and If i call ::

$payment = Payment::get($payment_id, $this->_api_context)->toArray();

return $payment; // for testing all data returned
return $payment['transactions']['related_resources']['transaction_fee'];

I get

{
   "id": "PAY-2VF66335NA241204VLP57H6I",
   "intent": "sale",
   "state": "approved",
   "cart": "7JA26864NE263820N",
   "payer": {
      "payment_method": "paypal",
      "status": "VERIFIED",
      "payer_info": {
         "email": "[email protected]_app.co.uk",
         "first_name": "Chris",
         "last_name": "",
         "payer_id": "T26U6W.....",
         "shipping_address": {
            "recipient_name": "Chris",
            "line1": "Spitalfields Arts Market, 112 Brick Lane,",
            "city": "London",
            "state": "London",
            "postal_code": "E1 6RL",
            "country_code": "GB"
         },
         "country_code": "GB"
      }
   },
   "transactions": [
      {
         "amount": {
            "total": "10.00",
            "currency": "GBP",
            "details": {}
         },
         "payee": {
            "merchant_id": "25NU22K9N8QME",
            "email": "[email protected]"
         },
         "description": "Mailbox Topup",
         "item_list": {
            "items": [
               {
                  "name": "Mailbox Topup",
                  "price": "10.00",
                  "currency": "GBP",
                  "quantity": 1
               }
            ],
            "shipping_address": {
               "recipient_name": "Chris",
               "line1": "Spitalfields Arts Market, 112 Brick Lane,",
               "city": "London",
               "state": "London",
               "postal_code": "E1 6RL",
               "country_code": "GB"
            }
         },
         "related_resources": [
            {
               "sale": {
                  "id": "5SK92059H7820592D",
                  "state": "pending",
                  "amount": {
                     "total": "10.00",
                     "currency": "GBP",
                     "details": {
                        "subtotal": "10.00"
                     }
                  },
                  "payment_mode": "INSTANT_TRANSFER",
                  "reason_code": "PAYMENT_REVIEW",
                  "protection_eligibility": "INELIGIBLE",
                  "transaction_fee": {
                     "value": "0.54",
                     "currency": "GBP"
                  },
                  "parent_payment": "PAY-",
                  "create_time": "2018-11-26T13:24:26Z",
                  "update_time": "2018-11-26T13:24:26Z",
                  "links": [
                     {
                        "href": "https://api.sandbox.paypal.com/v1/payments/sale/",
                        "rel": "self",
                        "method": "GET"
                     },
                     {
                        "href": "https://api.sandbox.paypal.com/v1/payments/sale//refund",
                        "rel": "refund",
                        "method": "POST"
                     },
                     {
                        "href": "https://api.sandbox.paypal.com/v1/payments/payment/",
                        "rel": "parent_payment",
                        "method": "GET"
                     }
                  ],
                  "soft_descriptor": "PAYPAL *TESTFACILIT"
               }
            }
         ]
      }
   ],
   "redirect_urls": {
      "return_url": "https://my-app.test/payments/paypal/status?",
      "cancel_url": "https://my-app.test/payments/paypal/status"
   },
   "create_time": "2018-11-26T13:24:26Z",
   "update_time": "2018-11-26T13:24:25Z",
   "links": [
      {
         "href": "https://api.sandbox.paypal.com/v1/payments/payment/",
         "rel": "self",
         "method": "GET"
      }
   ]
}

But when I try accessing the Transaction Fee I get an error Undefined index: related_resources.

How do i get that data?

Many thansk

22 Nov
2 weeks ago

skoobi left a reply on Undefined Variable $validator

Again after posting found the issue. As per usual an User error...

I pasted from the wrong controller.

if (isset($request->validator) && $request->validator->fails()) {
            return redirect()->route('customer.dashboard', '#account')->withErrors($request->validator, 'forwarding')->withInput()->with([
                'status' => 'There was a problem saving. Please try again!',
                'alert' => 'danger',
            ]);
        }

skoobi left a reply on Undefined Variable: User_id

Your view needs to be::

<a href="{{ route('adminContacts.create', ['user_id' => $user_id ) }}" class="btn btn-primary btn-block" style="margin-bottom: 5px">Add Contact</a>

skoobi started a new conversation Undefined Variable $validator

Hi. For some reason, the code that I copied and pasted from a working version doesn't work but the exact same code works for another Validation Request...

Heres the Controller ::

use App\Http\Requests\Customer\Dashboard\UpdateForwardingRequest;

/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function update(UpdateForwardingRequest $request)
    {
        if ($validator->fails()) {
            return redirect()->back()->withErrors($validator, 'forwarding')->withInput();
        }

        $forwarding = CustomerForwarding::where('user_id', Auth::id())->first();
        $forwarding->forwarding_address = $request->get('forwarding_address');
        $forwarding->forward_by_id = $request->get('forward_by_id');
        $forwarding->save();

        $account = CustomerSetting::where('user_id', Auth::id())->first();
        if (!$request->get('poste_restante')) {
            $account->poste_restante = 0;
        } else {
            $account->poste_restante = 1;
        }
        $account->region_id = $request->get('region_id');
        $account->interval_id = $request->get('interval_id');
        $account->forwarding_tel_no = $request->get('forwarding_tel_no');
        $account->save();

        return redirect()->route('customer.dashboard', '#forwarding')->with([
            'status' => 'Your details have been updated',
            'alert' => 'success',
        ]);
    }

The Request::

<?php

namespace App\Http\Requests\Customer\Dashboard;

use Illuminate\Foundation\Http\FormRequest;

class UpdateForwardingRequest extends FormRequest
{
    public $validator = null;

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'forwarding_address' => 'required|min:5',
            'region_id' => 'nullable',
            'interval_id' => 'nullable',
            'forwarding_tel_no' => 'nullable|numeric',
        ];
    }


    /**
    * Get the error messages for the defined validation rules.
    *
    * @return array
    */
    public function messages()
    {
        return [
            'forwarding_tel_no.numeric' => 'Please use only numbers.',
        ];
    }


    /**
     * Overrid Handle a failed validation attempt.
     *
     * @param  \Illuminate\Contracts\Validation\Validator  $validator
     * @return void
     *
     * @throws \Illuminate\Validation\ValidationException
     */
    protected function failedValidation(\Illuminate\Contracts\Validation\Validator $validator)
    {
        $this->validator = $validator;
    }
}

On another part, the exact same code works!

Any ideas?

18 Nov
3 weeks ago

skoobi left a reply on Where To Record A Log To Database When An Notification Is Successfuly Sent?

If you have the table setup then you only need to add a record.

‘’’ $log = Model::create([$user-id, “my message”]); ‘’’

After the Noification event or however it is setup.

skoobi left a reply on Retrieving Lat-lng Values From Database And Display Markers With Mapbox And Leaflet.js

I tried at the beginning of the year to use leaflet and map box but it wasn’t that easy to intigrate. Most of the packages that were out then were out of date (not sure if any have now been updated or any new ones made).

I opted for google maps instead as there’s a load of resources and tutorials on it.

15 Nov
3 weeks ago

skoobi left a reply on Access Laravel Auth Using Python

I saw this quite some time ago and managed to find a link for the tutorial. Not sure if it’s what your looking for or if it can help in anyway.

(https://www.sandervanhooft.com/blog/laravel/how-to-use-laravel-with-python-and-the-command-line/)[https://www.sandervanhooft.com/blog/laravel/how-to-use-laravel-with-python-and-the-command-line/]

14 Nov
4 weeks ago

skoobi left a reply on Forge Didn't Install Composer Or PHP?

This happened to me a little while back. Not sure why it happened but deleted the server and tried again and all was ok. But couldn’t figure out what went wrong.

skoobi left a reply on Dusk Not Using Correct Environment

.env.dusk.local

APP_NAME="My App"
APP_ENV=local
APP_KEY=base64:63YdeKeQvTlrYRKPUnWWOhAQfOQXlz1P/a4B3hWgk9o=
APP_DEBUG=false
DEBUGBAR_ENABLED=false
APP_URL=http://my-app.local

LOG_CHANNEL=stack

DB_CONNECTION=dusk

.env

APP_NAME="My App"
APP_ENV=local
APP_KEY=base64:63YdeKeQvTlrYRKPUnWWOhAQfOQXlz1P/a4B3hWgk9o=
APP_DEBUG=true
DEBUGBAR_ENABLED=true
APP_URL=http://my-app.local


LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=hostIp
DB_PORT=3306
DB_DATABASE=database
DB_USERNAME=User
DB_PASSWORD=myPasSworD

Cheers

skoobi left a reply on Dusk Not Using Correct Environment

Hi @staudenmeir, No, Its running on vagrant homestead machine!

skoobi started a new conversation Laravel Cashier And Braintree

Hi.

I'm trying to integrate Stripe and Cashier into an app I'm building, but I can't get my head around how to build a custom checkout like the Stripe Laracast video but for Braintree? or in particular PayPal payments.

Can Braintree and Stripe work together?

Many thanks

skoobi left a reply on Cron Job For Godaddy Shared Hosting

try

* * * * * php -q /usr/local/var/www/projectName/artisan schedule:run >> /dev/null 

skoobi left a reply on All Problems With The New Laracasts Design

Noticed when using the backtick to highlight code it sometimes cuts off the code... See screenshot here

skoobi left a reply on Mail Send Problem

Have you checked the mail settings?​ I.e. are you using `MAIL_ENCRYPTION=t or something similar​

skoobi started a new conversation Dusk Not Using Correct Environment

Hi.

I'm trying to use dusk to do browser tests but as soon as I run a test and it does its migration and seeding it uses the .env instead of the .env.dusk.local I know its supposed to create a backup of the .env file and then copy the dusk one over but it's not. I've​ gone through a load of solutions on StackOverflow​ and here but none have worked so far.

I've​ added to the CreatesApplication.php:

$app['config']->set('database.default', 'dusk');

and set my own database connection to connect to the dusk test database but as soon as I forget to change the DB_CONNECTION from MySQL to dusk it clears my database.

Any ideas?

13 Nov
4 weeks ago

skoobi left a reply on Dusk Not Seeding Correct Data

Sorted it...

Its always important when duplicating the .env file to make sure the APP_URL is correct. It was opening up the test site which has different information on it.

skoobi left a reply on Dusk Not Seeding Correct Data

Ok. It seems its seeding ok but now its doing the seeding correctly but when it tries to login with the user it doesnt work. The strange thing is if i seed the local env it works fine, just not when testing.

skoobi left a reply on When Editing Post

Spotted another one!!!

When using a backtick to highlight code it cuts off the code and adds the last few letters before it.

I.e. here is an example

skoobi started a new conversation Dusk Not Seeding Correct Data

Hi.

I'm trying to run Dusk Page tests using the database seeder, but I​ have a seeder class for `producti and another for `loc.

My DatabaseSeeder.php::

    // Create Users
        if (App::environment('local')) {
            $this->call(CreateTestUsers::class);
        } else {
            $this->call(CreateUsers::class);
        }

and my .env.dusk.local ::

APP_NAME="App"
APP_ENV=local

But when I​ run the tests it migrates the non-local​ ?? `CreateUsers::c when it should seed the he `CreateTestUsers::c

Ive tried calling the environment dusk and testing but still nothing.

Any ideas?

skoobi left a reply on Display Date On Pages Site Wide (via Master Layout Through Include)

In the @include file just add

{{ Carbon\Carbon::now()->toDateString() }} or whatever format you want

skoobi left a reply on Found FilesMan Backdoor On My Laravel Website

Also check your .gitignore file to make sure .env is in there and you're not pushing the .env file.

And just change every password under the sun to something solid... :)