Torpedo

Torpedo

Member Since 9 Months Ago

Experience Points 6,500
Experience Level 2

3,500 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 53
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

08 Aug
1 week ago

Torpedo left a reply on Missing Resource Route

so ok, found the issue, haha

the id field in the database was upper-case, changing to lowercase helped, everything works normal.. peww

Torpedo left a reply on Missing Resource Route

the policies where created long ago, i have checked them, they seem ok.. also when i view the resource manually i can see it..

Torpedo started a new conversation Missing Resource Route

Hello,

i have no clue why but suddenly one of my resources has no link for view or edit, i can still create and delete but not view or edit.. i didn't change anything last weeks, and everything worked as it should.. what have could cause this issue???

the view link is:

https://mypage/nova/

instead of:

https://mypage/nova/resources/myresource/id

and also the edit link is wrong..

what can i do?

07 Aug
2 weeks ago

Torpedo started a new conversation Duplicate Input Into Another Field

How can i achive that with laravel nova?

on the create page i would like to duplicate the input of one or more fields into another

(customer address into invoice address field)

right now i use computed field for this but its visible after the creation, so the flow is disturbed

thank you

Torpedo started a new conversation Update Fields On Nova Index Page

Hi,

I made editable fields for the nova index page, but some value depends on each other, i wonder how can i update the other fields without reloading?

i mark invoices as paid on the indexpage and fields likea boolean invoice payd should update immediately.

right now i refresh the whole index to achieve that, but that doesnt look nice..

09 Jul
1 month ago

Torpedo left a reply on Nova Index Row Background Color

thanks, it worked!

08 Jul
1 month ago

Torpedo started a new conversation Nova Index Row Background Color

Is there a way to change the background color of the index row based on some condition?

something like.. if resource has status canceled, background color red... how could i do this with nova?

03 Jul
1 month ago

Torpedo left a reply on Best Way To Check Invoice

or do i need broadcasting?

Torpedo started a new conversation Task Scheduling Between Dates

Hi,

Is it possible to run a command only from date to date? I scrape data from a website and save it in a model but i need the data only lets say from jan-june..

thanks

Torpedo started a new conversation Best Way To Check Invoice

I am not sure what the best way is to check something like..

if invoice overdue date is past, then create reminder

where do i write this logic? in an observer? event? scheduling? or something else..

17 Apr
4 months ago

Torpedo left a reply on Nova Action: Export Resource To A Customized PDF

@FABIOBETTIOL - you can just open the created pdf in a new tab, no need for a extra route for it..

i did it like this:

        $invoicePDF = new PdfPrintController();
    $invoice_nr = Invoice::max('invoice_number');
        $path = $invoicePDF->makePDF($model);

    return Action::openInNewTab(url($path),'Rechn-'.$invoice_nr.'.pdf');

28 Mar
4 months ago

Torpedo started a new conversation Firing Actions From Custom Tool

i am looking for a way to open a nova action from a custom tool, with a button.. how can i do that?

Torpedo started a new conversation Live Update Fields

what are the easiest/best ways to live update fields on the nova resource-index page without reloading??

i made some custom inline edit fields where i can edit on the indexpage.. but depend on my entry, a boolean field should update also instantly.. how can i achive this?

14 Feb
6 months ago

Torpedo started a new conversation Laravel Nova Actions Redirect In New Tab

In Nova doceumentation there is: ยด


return Action::redirect('https://example.com');

but it opens in the same tab.. is it possible to open in a new tab.. or at least in a modal?

28 Jan
6 months ago

Torpedo started a new conversation Where To Put The Logic For Create Etc.

where is the best place to build the custom logic for the resource like

lets say invoice:

conditionals, invoicenumber etc.. and how can i use it with Nova Fields?

so if resource has already a invoice than do this and sso on..

thank you

Torpedo started a new conversation Using Filter In Actions

Ist it possible to use custom Filter or Lens in Actions?

Like Action: create invoice and than filter the index for resources without invoices or something like that? if its possible how/where can i call the filter inside the action?

thanks

25 Jan
6 months ago

Torpedo left a reply on Card Value Show Full Number

also solved in 1.3.1

11 Jan
7 months ago

Torpedo started a new conversation Passing Actionsfields To Mailable

This is code from my action

            foreach ($models as $model):

                $recipient = Customer::find('customer_email');

                $to = $fields->email_recipient;
                $QuotePDF = new PdfPrintController();

                $path = $QuotePDF->makeQuotePDF($model);


                Mail::to($to)->send(new QuoteMail($fields->email_subject, $fields->email_content, $path));

            endforeach;

this is mailable

    public $subject;
    public $emessage;
    public $path;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($subject, $emessage, $path )
    {
        $this->email_subject = $subject;
        $this->email_message = $emessage;
        $this->path = url($path);


    }

    /**
     * Build the message.
     *
     *
     *
     * @return $this
     */
    public function build()
    {
        return $this->markdown('email.quotemail')->subject($this->email_subject)->attach($this->path, [
                'as' => 'quote.pdf',
                'mime' => 'application/pdf',
            ]);
    }

i am trying to pass input from my actions fields, Subject is passed, the emessage and path are not passed to the view..

but the path works as the correct pdf is attached

what's wrongwith my code?

04 Jan
7 months ago

Torpedo left a reply on How Can I Change The Visible Metrics??

hmm.. thanks :(

tried different methods.. but the outcome is the same..

Torpedo started a new conversation How Can I Change The Visible Metrics??

The Metrics are shown like this:

"1.19k"

instead of just

"1190"

how can i change this?

its a simple count from the originial example.. with count()

Torpedo left a reply on Nova Metrics Simple Count Doesn't Work

maybe someone has the same problem.. so the answer is:

metrics query is looking for the created_at column in the DB, so it must have an date

the metrics query is like this..

SELECT count(`id`) as aggregate FROM `Objects` WHERE `created_at` between '2018-11-05 12:51:22' and '2018-12-05 12:51:22' and `Objects`.`deleted_at` IS NULL

:)

01 Jan
7 months ago

Torpedo left a reply on Nova Metrics Simple Count Doesn't Work


<?php


namespace App\Nova\Metrics;

use App\Kunde;
use Illuminate\Http\Request;
use Laravel\Nova\Metrics\Value;

class TotalKunden extends Value
{
    
    /**
      * Calculate the value of the metric.
      *
      *@param \Illuminate\Http\Request $request
      *@return mixed
      */
      
      public function calculate(Request $request)
      {
          return $this->count($request, Kunde::class);
      }
    
    


    /**
    * Get the ranges available for the metric.
    **/
    
    public function ranges()
    {
        return [
            30 => '30 Tage',
            60 => '60 Tage',
            365 => '1 Jahr',
            'MTD' => 'Seit Monatsbeginn',
            'QTD' => 'Seit Quartalbeginn',
            'YTD' => 'Seit Jahresanfang',
            
        ];
    }
}

code should be ok? but it doesn't work..

28 Dec
7 months ago

Torpedo started a new conversation Nova Metrics Simple Count Doesn't Work

If i count my User::class model, the metrics work, but when i change it to an other model it shows

" 0 No Data "

the model exists an i do import it.. is it because i imported the data for the model directly in phpmyadmin? if so.. what can i do?

thanks in advance.

25 Dec
7 months ago

Torpedo left a reply on Force Nova To Use Another Locale

just import the dutch language files and change the localisation in teh config file of laravel ;)

did the same with german.

19 Dec
8 months ago

Torpedo left a reply on Action For Multiple Models

thank you very much ;)

i had to put before the foreach, is this normal behaviour??

<div style="display: none;">{{$quotes}}</div>

@foreach($quotes as $quote)

without it didn't work.. nothing happened

17 Dec
8 months ago

Torpedo left a reply on Action For Multiple Models

@AURAWINDSURFING - thanks for suggestions..

i use dompdf for generating..

i am not sure how to do that, do you have a code example?

i tried differnet things in my controller like foreach, but it didnt work.. :/

Torpedo started a new conversation Action For Multiple Models

  1. I have action with creates a pdf , it works well / per Model.. but doesnt work if multiple models are checked in the nova index view..

is there an example how to do that?

  1. how can i insert some options to the action like checkboxes etc,?

thank you

13 Dec
8 months ago

Torpedo left a reply on How To Generate A Ressource Model In Controller?

found the answer myself..

its just

Model::create();

Laravel is so much fun :D

12 Dec
8 months ago

Torpedo started a new conversation How To Generate A Ressource Model In Controller?

I have a nova action with creates a pdf, how can i create a new model in my ressource after that?

lets say.. download invoice as pdf and save the created invoice as a new rmodel with fields...

thanks for help D

02 Dec
8 months ago

Torpedo left a reply on Using Laravel Packages In Nova

@AURAWINDSURFING - i am trying to recreate the action..

but i got error: "Class 'App\Nova\Actions\InvoiceController' not found"

my controller is in app/http/controllers how do i link to it?

01 Dec
8 months ago

Torpedo started a new conversation Using Laravel Packages In Nova

Hello, is it possible to use laravel packages in laravel nova? or do they have to be converted?

sorry i am pretty new to both laravel and nova.

regards D