Ninja++
Ninja++
Explore posts from servers
WWasp-lang
Created by Ninja++ on 5/9/2024 in #🙋questions
Path error
WARNING: It looks like '/Users/milesscott/.local/bin' is not on your PATH! You will not be able to invoke wasp from the terminal by its name.
You can add it to your PATH by adding following line into your profile file (~/.profile or ~/.zshrc or ~/.bash_profile or ~/.bashrc or some other, depending on your configuration):
export PATH=$PATH:/Users/milesscott/.local/bin
WARNING: It looks like '/Users/milesscott/.local/bin' is not on your PATH! You will not be able to invoke wasp from the terminal by its name.
You can add it to your PATH by adding following line into your profile file (~/.profile or ~/.zshrc or ~/.bash_profile or ~/.bashrc or some other, depending on your configuration):
export PATH=$PATH:/Users/milesscott/.local/bin
I have tried to edit this path file but i really don't understand what i am doing. Here is my attempt to edit the file below.
/usr/bin/env bash
export PATH=$PATH:/Users/milesscott/.local/bin
waspc_datadir=/Users/milesscott/.local/share/wasp-lang/0.13.2/data
/Users/milesscott/.local/share/wasp-lang/0.13.2/wasp-bin "$@"
/usr/bin/env bash
export PATH=$PATH:/Users/milesscott/.local/bin
waspc_datadir=/Users/milesscott/.local/share/wasp-lang/0.13.2/data
/Users/milesscott/.local/share/wasp-lang/0.13.2/wasp-bin "$@"
An explanation of what i am not understanding would be really appreciated
44 replies
FFilament
Created by Ninja++ on 8/23/2023 in #❓┊help
Show price when item selected.
Hey guys can anyone recommend an approach i should take. I want to show the cost field value for an item when i select that item in a select option next to it. So when you select a item you see its cost pop up next to it. Here is the current relevant step in the from wizard ```
34 replies
FFilament
Created by Ninja++ on 8/23/2023 in #❓┊help
Call to undefined method App\Models\Projects::brand()?
Apparently in some of my tables i am calling for this method, but it does not exist in any part of my code or the entire project folder? Totally lost on this one guys.
6 replies
FFilament
Created by Ninja++ on 8/22/2023 in #❓┊help
File Download DNS error?
I am trying to download the files i have uploaded to the public storage folder and saved the path into the database. When i click to download the file it gives me this error.
This site can’t be reachedadditve.testapp’s DNS address could not be found. Diagnosing the problem.
DNS_PROBE_POSSIBLE
This site can’t be reachedadditve.testapp’s DNS address could not be found. Diagnosing the problem.
DNS_PROBE_POSSIBLE
The files are being uploaded to the folder i expect them too
storage/app/public
storage/app/public
filesystem.php``

'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'app/public',
'visibility' => 'public',
'throw' => false,
],
filesystem.php``

'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'app/public',
'visibility' => 'public',
'throw' => false,
],
And the file upload is as follows.
return $form
->schema([
FileUpload::make('printUrl')
->preserveFilenames()
->downloadable()
->label('Print')
->required()
->visibility('public'),
]);
return $form
->schema([
FileUpload::make('printUrl')
->preserveFilenames()
->downloadable()
->label('Print')
->required()
->visibility('public'),
]);
I don't have the best understanding of DNS so i am unsure what is blocking the download, especially because it says it is possible.
2 replies
FFilament
Created by Ninja++ on 8/22/2023 in #❓┊help
File downloads DNS address could not be found. Diagnosing the problem.DNS_PROBE_POSSIBLE
When i try to download the file i have uploaded to the public folder and saved the path in the database it gives me a
DNS address could not be found. Diagnosing the problem.
DNS_PROBE_POSSIBLE
DNS address could not be found. Diagnosing the problem.
DNS_PROBE_POSSIBLE
The file goes to the
storage\app\public
storage\app\public
folder fine but when i try to download the file it does not gives me the above error.
filesystem.php
filesystem.php
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'app/public',
'visibility' => 'public',
'throw' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'app/public',
'visibility' => 'public',
'throw' => false,
],
File upload form:
return $form
->schema([
FileUpload::make('printUrl')
->preserveFilenames()
->downloadable()
->label('Print')
->required()
->visibility('public'),
]);
return $form
->schema([
FileUpload::make('printUrl')
->preserveFilenames()
->downloadable()
->label('Print')
->required()
->visibility('public'),
]);
I do not understand why i can't download the file. Any insight is appreciated.
2 replies
FFilament
Created by Ninja++ on 8/21/2023 in #❓┊help
Wizard Step type error
I have gone through the video on Dans youtube showing how to implement the wizard, however when i go to the create page it gives me this error.
App\Filament\Resources\ProjectsResource\Pages\CreateProjects::{closure}(): Argument #1 ($step) must be of type Filament\Forms\Components\Wizard\Step, Filament\Forms\Components\Wizard given
App\Filament\Resources\ProjectsResource\Pages\CreateProjects::{closure}(): Argument #1 ($step) must be of type Filament\Forms\Components\Wizard\Step, Filament\Forms\Components\Wizard given
I went back through the video and the wizard documentation page and i don't understand what i am doing wrong.
9 replies
FFilament
Created by Ninja++ on 8/21/2023 in #❓┊help
syntax error, unexpected identifier "Stat", expecting "function" or "const"
I am trying to make a widget on my materials resource page that shows the total number of materials in the table. I am unsure why it is not expecting
Stat
Stat
<?php

namespace App\Filament\Resources\MaterialsResource\Widgets;

use Filament\Widgets\Widget;
use Filament\Widgets\StatsOverviewWidget\Stat;
use Filament\Widgets\StatsOverviewWidget\Stat;
use Illuminate\Database\Eloquent\Model;


class MaterialsWidget extends Widget
{
use ExposesTableToWidgets;
use InteractsWithPageTable;


protected function getTablePage(): string
{
return ListMaterials::class;
}

Stat::make('Total Materials', $this->getPageTableRecords()->count()),

protected static string $view = 'filament.resources.materials-resource.widgets.materials-widget';
}
<?php

namespace App\Filament\Resources\MaterialsResource\Widgets;

use Filament\Widgets\Widget;
use Filament\Widgets\StatsOverviewWidget\Stat;
use Filament\Widgets\StatsOverviewWidget\Stat;
use Illuminate\Database\Eloquent\Model;


class MaterialsWidget extends Widget
{
use ExposesTableToWidgets;
use InteractsWithPageTable;


protected function getTablePage(): string
{
return ListMaterials::class;
}

Stat::make('Total Materials', $this->getPageTableRecords()->count()),

protected static string $view = 'filament.resources.materials-resource.widgets.materials-widget';
}
14 replies
FFilament
Created by Ninja++ on 8/21/2023 in #❓┊help
Please critique my approach
My final goal for this rushed project is to be able to parse a .STL file, get and get its volume. Hopefully with this package. https://github.com/ChubV/php-stl Then saving that volume as a variable and using it along with other choices in that from to get a dynamic price for the order. My understanding so far is that i should build a custom Livewire component that you can then click upload the .STL file in and click a button to call the volume function from the PHP-stl package. Save that variable and then its fairly straightforward checks and math from there. Is this a sensible way to go about this? I would appreciate some input.
2 replies
FFilament
Created by Ninja++ on 8/20/2023 in #❓┊help
How is this Open/view functionality enabled.
16 replies
FFilament
Created by Ninja++ on 8/19/2023 in #❓┊help
Resource required route parameter.
4 replies
FFilament
Created by Ninja++ on 8/18/2023 in #❓┊help
How to add widgets to default dashboard page.
Hi I am a little confused about how to add the widgets i have created to the defualt page that comes with the admin pannel. I am struggling to understand were it is defined in the file structure at all. I have made widgets and can add them to other pages i have created but not been able so far to add this to the defult page. Thanks in advance
47 replies
FFilament
Created by Ninja++ on 8/17/2023 in #❓┊help
SQLSTATE[HY000] [1045] Access denied for user '
21 replies
FFilament
Created by Ninja++ on 8/16/2023 in #❓┊help
Struggling with Sadie Permissions
2 replies