[00:01] you a new Laravel package called Laravel Truss to see your database structure like this. And it's not the first package that does something similar, but the way how it works, you just run composer require and that's it. I really [00:16] like the simplicity and that package comes from Alberto Arena from Italy. So thank you Alberto for this package and let me show you that in action. And side note, this is how I decide to shoot videos about any packages. First I show [00:29] the packages on Twitter and on my newsletter and if I see the traction from the community, so likes, views and comments, then I decide to shoot a video. So Alberto kind of earned his place with a separate video on my [00:41] channel and also the topic is pretty hard because if you land on my Laravel Daily channel and if you go to videos and go popular, the number one popular video from nine years ago is about database structure. In that case it was [00:57] MySQL Workbench which I assume still does work for that, but for that you need to install separate software. In case of Laravel Truss, you don't. Let me show you that in action. So first I installed Laravel Truss in a very simple [01:10] almost default Laravel project. Just composer require and that's it. And then I launch that URL in the browser and I get the database schema. That's it. I don't need to configure anything else. So this is the default Laravel structure [01:24] and media with Spatie Media Library on top. So I was experimenting with Kimmi model for another video. But this is not just table structure. What I did like is the navigation. So in addition to zooming in and out which is on the [01:39] bottom right, then on the top left you can focus on one of the tables. For example, media and then it jumps to media table or users for example, it jumps to being here in the center. Also you can switch from Laravel types to [01:54] database types and then this column changes from like string to varchar, then you can search for table name again pass keys for example, but of course it doesn't show anything because I chose to focus on users, then I focus on none and [02:08] pass keys is now the focus because I have a filter here. In addition to that, on the top right we have download and you can choose for example export PNG, and by default it exports what is seen on the screen. So, if you export PNG [02:23] now, the result of that PNG is just the pass keys table in PNG. But if I remove the filter, so no focus, and then I download the same PNG, which is not [02:35] actually the same because now it contains all the database schema. Also, I have schema doctor for health of the database, and I will show you that in a minute for more complicated database. Then you have the legend, I can probably [02:49] zoom that in, and of course no one can survive without dark mode these days, so you can switch that here. So, let's zoom out for now to 100% and let me show you a more complex database. So, this was a filament project for pool stock [03:04] management, and it was much more complicated, but again, I do composer require, you can do dash dash dev or without dash dash dev, but I probably prefer to do those things locally. And that's it, I didn't configure anything, [03:17] that's it, I didn't configure anything, and then I go to /truss of that project, and I see this. And of course you can navigate left and right and zoom in and out like in a typical database schema software, but again, you can search for [03:31] users, which will give you just single table without any relationships, but you can also focus on users, which will give users with relationships just in the middle. I really like that navigation, really convenient. But now let's go to [03:46] the top right and see that notification. See the number three, there are three issues that Laravel Truss found with this database. All of those issues are about pivot tables have no unique keys, so duplicate pairs are possible. Legit [04:03] issue and probably I should take care of it on a database level, but for example, another kind of navigation one step further is not just the issue you can focus on specific table. So, you can click here and then the table becomes [04:18] highlighted. Also, there's number number one here, which means that this table has some kind of problem and you can see the details when clicking that top right icon. So, this is the visual kind of Truss Doctor. All of those things [04:32] actually are available in the terminal as well. So, in the GitHub you can read the documentation and the features contain not only visuals, but also something like this. So, Truss Doctor, then there are quite a few things that [04:45] you can customize like connections, like presets and then export formats. It's not just PNG, it's more than that, but you can read the docs for more options. But just that convenient navigation and basically zero effort, zero config [05:00] install are two selling points to use this package in my opinion. Also, in one of the recent versions Laravel Truss added theme builder. So, you can customize colors and fonts. So, on the left side you can see the options. So, [05:15] you can prefer to emphasize borders in a different way or I don't know, choose another color. Let's just do something random and then you can export the config and get that into your config Truss PHP. Also, Laravel Truss offers [05:30] MCP server, which could serve similar to Laravel Boost. So, when your AI agent needs database schema, it could access the list tables and stuff like that. But in my personal opinion, it's an overkill because current AI agents use Laravel [05:45] Boost tools to get the schema, get the database structure. So, personally, I would not use MCP server for this, but it is available. So, yeah, this is the package again by Alberto, and I would suggest to follow Alberto on Twitter [05:59] because it's not just about Laravel Trust. He's also blogging on his blog. So, one of the recent post is about Laravel event sourcing generator with two versions. So, I do recommend to read that and follow Alberto in general on [06:14] Twitter. I really want to hype the creators, the builders that are working on something interesting, working in public, and Alberto is my recent kind of guys think about Laravel Trust? Do you use something else, some similar package [06:29] or external tool to look at your database structure yourself or within Let's discuss the alternatives in the comments below as usual. And final reminder, on my Laravel Daily, I have a free resource best packages. Here's the [06:44] menu item on top. So, for now, 220 best Laravel packages, and now Laravel Trust was added as the latest addition, kind of earned its place on the latest added packages list here on the left, and you can submit your own package if it's not [06:59] on the list. If it's a new package, I will probably share that on social media, or maybe if it's for some reason not in my list here of packages, then I may add that to the list if it's a Laravel package useful for the [07:13] community. So, the link to that page will be in the description of this video below. That's it for this time, and see you guys in other videos.