MilenKo
MilenKo
Explore posts from servers
TLCTuto's Laravel Corner
Created by MilenKo on 2/21/2024 in #🚀laravel
Laravel notifications approach for live messasges
Hello all. I am working on a Laravel Blade project where I need to implement a live messaging system using Munafio's cool plugin Chatify. Everything works, I am able to connect Chatify to Pusher back and forth, receiving events etc. So my question is more of the best approach rather than how specifically to achieve it. So I have a usual setup of Laravel where all my templates extend the default app.blade.php inside of which I have included the header markup for the live notifications. Since the idea is to have the notifications show for authenticated users on any of the templates, I could not just pull some data and pass it to the default layout as it is used for extending and not for navigating. So my question is, how would you do the setup if your default temnplate contains the header markup for the notifications counter which when clicked would shoe either the last X-messages and the new ones will be in another color/bold (like FB styling) or to just show the new notifications (depending on the project coordinators decision).
5 replies
TLCTuto's Laravel Corner
Created by MilenKo on 12/27/2023 in #💡filament
Filament-selectify
Hello all. Merry Christmass and a Happy New Year! For those who believe still in Santa, I thought to take a lead and share something interesting I've found. I am not in any way related to it (unfortunately) but just thought that for people who would like to make their coding life easier and like to use for their projects the mighty Filament admin panel , this would be a perfect addition: https://github.com/andrewdwallo/filament-selectify In other words, this plugin allows adding a new custom field using selectify with a ON-OFF switcher as well as a button group with options similar/close to filament standards. Happy Coding! @tuto1902 Maybe it will be nice to have a separate channel for filament addons/plugins/mods where those can be shared, indexed and used by people like myself who are discovering something new everyday and have no issues sharing it if/when found useful 🙂
2 replies
TLCTuto's Laravel Corner
Created by MilenKo on 11/19/2023 in #🚀laravel
Nova vs Filament Admin Panels
Hello guys. Maybe a rookie question in terms of Admin panels, but does anyone of you see any benefits of using Nova vs Filament or vice versus excluding the price terms, which is clear for me? What I am asking myself is should I spend some dime to invest in Nova or I should stick to the good old so far so good Admin panel which thanks to @tuto1902 and the great community I've learned and extended to cover all my project needs so far. Here are the points that I am thinking of: 1. Performance 2. Ease of install 3. Ease of upgrade without sacrificing any data 4. Ease of adding panels/fields/forms etc. 5. Modules extension and extra functionality without some crazy coding and time investment. In other words, anybody can share their PROS or CONS for any of the two, which could help others take their own decision. I personally liked Filament since v2, but I did not dare to use it much in projects before master minds like Tuto, Toni and many others gave me enough kicks to start small and realize its true potential. These days there are just 2 things I've not done yet - payments for plans or per item terms as well as having custom admin theme for the complete admin panel (and no, I am not talking about filament theme with changed colours, but real custom-built Admin Panel that is implemented by client's requests or your premium admin you have purchased some time ago and would like to use for a project). I, for sure, like the free Filament as Nova is a great supporter to Laravel main mastermind but for a tiny project paying the fee sometimes is an overkill. What is your experience with both and what you dis/liked about one vs the other?
7 replies
TLCTuto's Laravel Corner
Created by MilenKo on 11/7/2023 in #🚀laravel
Filepond image gallery issue
Hello everyone. I am baddly suffering of puling my hairs while fioghting with Filepond to allow a simple user gallery to allow: 1. Image adding 2. Image re-ordering 3. Pre-existing images showing in the gallery 4. Update of any image from the gallery and post back to DB and file storage I am able to do steps 1-3 no worries and almost any script would do that, but when we need to edit existing images, I am not sure how to pass them as objects as I am able to pass their ID, name and src (full image path) but when I remove one image from existing (for example) and then try to resubmit, it does not validate as it does not see the images as objects. Tried with another simpler gallery as I can live without image reordering, but that did not work either because of the same issue. The current one I am testing is: jquery image-uploader-master. Has anyone made ever a gallery to allow to show existing images, remove/add new images, clean what is old and got removed and resubmit back the proper data? Any gallery would work as far as I can make it work as it has been too long and I am surprised all the tutorials, videos, manuals etc. I've read are only talking about adding images, but not removing and updating/reordering those... Starting to think I should build my own gallery at this time, but I just want to finish my project and focus on the PET CLINIC as I am sooo behind... 😦
5 replies
FFilament
Created by MilenKo on 9/17/2023 in #❓┊help
Show more than one resource inputs into a single Table\Column
Hello all. Sorry if my question sound silly as I am new to Filament I was trying to read through the documentation for a simple and an elegant way to present the data from multiple table columns into a single one as merged. As an example, I have two fields: date and time where I add the day of event and time of it. In the edit form, I am presenting both separately but in the List I would like to merge the two (e.g. d/m/y - h:i instead of showing extra columns. Why would I separate the two instead of providing a single field DateTime - well it is a project that is required to have events with parameter: start_date, start_time, end_date and end_time. I know i is easy to join the two but I find the picker a bit hard for a non-tech savvy person and my friend asked specifically not to take this way but to have separate input fields. In terms of data storing, it all works perfectly fine and I am totally fine with the parameters used, just not finding a way to merge date and time into a single Table\Column field. If someone can at least point me to the documentation example as I feel it is all documented and I am just not searching for the right keywords...
2 replies
TLCTuto's Laravel Corner
Created by MilenKo on 9/17/2023 in #💡filament
Show multiple table columns in a single table column of ressource
Hey guys, me again. I am trying to find some documentation/info about how can I show in a table column the joined data from two fields (e.g. start_date and start_time which are two separate inputs of date/time would like to become: 21/12/2023 - 16:15 instead of showing each column separately. I believe we've done that with the pet clinic, but since I've started the project from video 1, I might have lost or not yet reached some of the merged data practice. Any hint or a link where to look as I seem to have some weird difficulty finding data in the documentation but I am not sure it is the fault of the DEVs who wrote the data
11 replies
TLCTuto's Laravel Corner
Created by MilenKo on 9/17/2023 in #💡filament
Edit Create resource title text
No description
7 replies
TLCTuto's Laravel Corner
Created by MilenKo on 9/15/2023 in #💡filament
Show record index in table row
Hey guys, I know this might sound a bit silly but I was reading the documentation of Filament and seem to not get my head around how can I show a simple table rows index instead of record id. Why I need that? Sometimes when we edit records and re-add some new, the ID of the table changes (of course) but we would still like to present the first one as 1, second as 2 etc. I am sure I am missing something ridiculously simple but just to speed up the custom project development and ask the great knowledge here to share some more, I will wait patiently for the answer to laugh at my miss (again) 🙂
17 replies
TLCTuto's Laravel Corner
Created by MilenKo on 9/14/2023 in #💡filament
How to use custom Admin UI with Filament
Hello guys. II've been with Laravel for a year or so and I love it so far. So is with Livewire which surprised me with it's simplicity in many occasions in terms of dynamics and code easiness to digest. I've came across Filament in a few months so I am still learning my way through this incredible ecosystem but I feel comfortable now thanks to tuto and many other contributors to build a semi-complex project on my own. The one thing that I would like to know and I've done some research on it already is how can we build a fully customized admin theme still using Filament under the hood. And by fully customized theme I am not meaning to change colors, backgrounds, icons etc. that Filament already allow with the custom theme, but what I mean is to use the incredible power to build quickly with Filament but use a custom ADMIN UI like AdminLTE, CoreUI or any other admin design that a project requires us to use. And yes, that would mean to change many templates etc. but maybe this would be an extended theme or whatever it is called, as otherwise if we all use the default Filament, one day all web admins will look identical and a bit boring for that matter. Any ideas, suggestions or directions are more than welcome. P.S. I've seen some people talking about Filament with Bootstrap 5 etc. so if they succeeded to swap the Tailwind with BS I guess there is always a way, just not aware how hard it is and what is the optimal approach to start my ressearch in that direction...
5 replies
TLCTuto's Laravel Corner
Created by MilenKo on 9/13/2023 in #🚀laravel
Illuminate/Support not loaded while trying to install nunomaduro/larastan
Hello there friends. As part of following the Pet Clinic project and learn the filament admin inside out I decided to start fresh (I've joined later than the first class the livestream) so I've just created a new petclinic.lar project locally and it is all set, but when I attempt to follow up with the video and install larastan, I got a weird error using the composer command: composer require nunomaduro/larastan:^2.0 --dev:
PS C:\OpenServer\domains\petclinic.lar> composer require nunomaduro/larastan:^2.0 --dev
./composer.json has been updated
Running composer update nunomaduro/larastan
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires nunomaduro/larastan 2.0 -> satisfiable by nunomaduro/larastan[2.0.0].
- nunomaduro/larastan 2.0.0 requires illuminate/console ^9 -> found illuminate/console[v9.0.0, ..., v9.52.15] but these were not loaded, likely because it conflicts with another require.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.
PS C:\OpenServer\domains\petclinic.lar> composer require nunomaduro/larastan:^2.0 --dev
./composer.json has been updated
Running composer update nunomaduro/larastan
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires nunomaduro/larastan 2.0 -> satisfiable by nunomaduro/larastan[2.0.0].
- nunomaduro/larastan 2.0.0 requires illuminate/console ^9 -> found illuminate/console[v9.0.0, ..., v9.52.15] but these were not loaded, likely because it conflicts with another require.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Does anyone has an idea what might be wrong as it is a brand new project using PHP 8.1, any other packages were correctly installed and project ready to go, just that I would like to see what larastan does as well and seems to have an issue with that... I've read in StackOver that I should check my composer.json and remove any Illuminate\Support if there and do a composer update, but that did not help much and I did not even had that line.
22 replies
TLCTuto's Laravel Corner
Created by MilenKo on 9/12/2023 in #💡filament
Working on a Laravel Filament project using remote Shared Hosting
Hello guys. As part of my "training punishment" I decided to try to install a fresh Laravel + Filament project on my shared cPanel hosting and edit the files locally with a remote sync. Why am I trying this - simple, I switch PCs often as part of my IT work related day so having a centralized project space would allow me to edit from wherever whenever. So far, I've discovered a package provided from Micro$oft named RemoteSSH which allows you to connect to a shared host, lists all your files in the editor and you update directly. The issue with this approach is that when you need to transfer some files to the host, you can't copy/paste the folder or multiple files at once in VSCode (or at least it did not work with me to transfer 20Mb of assets). Besides that, the connection is reset quite often and it is almost impossible to reconnect without restarting the PC or else. Another issue with RemoteSSH is that I am unable to execute any of the composer/artisan/filament commands. It just sends the command, no messages of an error but no actions either so when you want to create a full resource with this tool, you should manually create a model, controller, migration etc. etc. Later on, I've discovered another way of achieving my needs, which seems to be more elegant (not flawless again but workable) - using SSHFS-Win application (available for free in GitHub etc.). So what this app does is mapping a remote host to a specific drive letter of choice (or a folder under Linux) so that any IDE would access it as a local project allowing copy/paste etc. This method seems a bit more reliable, stable etc. however I started noticing an issue with the File Format on SAVE with VSC as it tries several times to save and I guess it starts to loop. Since this method is opening the project as a local, it allows me to open a local console so I am lead to believe I can use it to issue all Laravel commands.
9 replies