<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ján Timoranský on Medium]]></title>
        <description><![CDATA[Stories by Ján Timoranský on Medium]]></description>
        <link>https://medium.com/@timoransky?source=rss-e37d95900cf0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KZmaB2b62O1hcj3Ok7heRw.jpeg</url>
            <title>Stories by Ján Timoranský on Medium</title>
            <link>https://medium.com/@timoransky?source=rss-e37d95900cf0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 01:29:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@timoransky/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[CSS Today: Powerful Features You Might Not Know About]]></title>
            <link>https://blog.meetbrackets.com/css-today-powerful-features-you-might-not-know-about-39adbbd5c65b?source=rss-e37d95900cf0------2</link>
            <guid isPermaLink="false">https://medium.com/p/39adbbd5c65b</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[Ján Timoranský]]></dc:creator>
            <pubDate>Thu, 28 Nov 2024 14:40:36 GMT</pubDate>
            <atom:updated>2024-11-28T14:40:36.683Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gatBVX-nrwbFehBDeayS6A.jpeg" /></figure><p>CSS is constantly evolving — it recently got a new logo, and we at <a href="https://medium.com/u/68ca0e375b2f">BRACKETS by Triad</a> realized there have been so many new features released over the past year that haven&#39;t received much attention. We’re talking about stuff like finally being able to center a div without losing your mind, dealing with dark mode more easily, animating hidden elements, or using CSS to solve math problems. It’s like we can do more with less hassle now, so let’s check out some of these newer CSS features that showed up recently.</p><h3>One-liner for centering</h3><p>Yes, it finally happened. You no longer need to google how to center div each time you forget one of the multiple possible solutions. Since March of 2024, most modern browsers support <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/align-content">align-content</a>: center for block layouts as well. That means you can now easily center the children elements using one line, without the need for flexbox or grid layouts.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fembed%2Fpreview%2FNWQZqMM%3Fdefault-tabs%3Dcss%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DNWQZqMM&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fpen%2FNWQZqMM&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FNWQZqMM-512.jpg%3Fversion%3D1732114604&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/91157418c7f448b905911fcc4099d7d0/href">https://medium.com/media/91157418c7f448b905911fcc4099d7d0/href</a></iframe><h3>New CSS transition capabilities</h3><p>Animating initially hidden elements has long been a challenging task in CSS. Two new CSS properties now provide an elegant solution to this age-old problem, allowing smooth animations for previously hidden elements across all major browsers.</p><p>The <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@starting-style">@starting-style</a> rule lets you define initial styles for the element’s animation. When combined with <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transition-behavior">transition-behavior: allow-discrete</a>, you can now create animations for display: none or other discrete properties. This is particularly useful for elements like dialogs or popovers, which are hidden by default.</p><blockquote>display: none and display: block styles are applied automatically for popover, so we don’t need to specify these in the example bellow, but for the sake of the demo, I included those styles as well.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fembed%2Fpreview%2FqBezyPr%3Fdefault-tabs%3Dcss%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DqBezyPr&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fpen%2FqBezyPr&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FqBezyPr-512.jpg%3Fversion%3D1732180671&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/0bd4b290907db0a87249ff573e0ddfbe/href">https://medium.com/media/0bd4b290907db0a87249ff573e0ddfbe/href</a></iframe><h3>Managing dark mode styles with ease</h3><p>Writing styles for both light and dark mode was a little tedious since you had to use a @media (prefers-color-scheme: &lt;color-scheme&gt;) query for different color schemes. However, nowadays you can simply use the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark">light-dark</a> function as a shorthand for both light and dark color scheme queries. This way you can apply both styles using just one line, which might clean up some of the code, making it more readable in the end as well.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fembed%2Fpreview%2FrNXEVqX%3Fdefault-tabs%3Dcss%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DrNXEVqX&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fpen%2FrNXEVqX&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FrNXEVqX-512.jpg%3Fversion%3D1732093922&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/de94953b7f121db5cf65a6e431229a8b/href">https://medium.com/media/de94953b7f121db5cf65a6e431229a8b/href</a></iframe><h3>Styling (in)valid inputs</h3><p>This feature isn’t exactly new but I only discovered it recently. Like some of you, I also sometimes use :valid and :invalid CSS selectors to style the form inputs based on their validation state. For basic forms, it works just fine. However, the issue with this approach is that the styles are applied instantly, without user interaction. Because of this, I often rely on JavaScript to conditionally apply styles only after the user modifies the input.</p><p>But worry no more — the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:user-valid">:user-valid</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:user-invalid">:user-invalid</a> selectors solve this problem with pure CSS. The styles are triggered automatically after the user moves focus away from the input or submits the form without prior interaction.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fembed%2Fpreview%2FqBezOBq%3Fdefault-tabs%3Dcss%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DqBezOBq&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fpen%2FqBezOBq&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FqBezOBq-512.jpg%3Fversion%3D1732093828&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/7421f7eeb54cb483ba727b7b5fcbc8e4/href">https://medium.com/media/7421f7eeb54cb483ba727b7b5fcbc8e4/href</a></iframe><h3>Adjusting the fallback font size</h3><p>I guess everyone is familiar with the following issue: you are tasked to work on a cool website with some custom fonts, but you cannot find a good fallback font. When the custom font is not loaded for some reason, you realize that the website looks very different with the fallback font applied. And there was no way to solve this… until this year.</p><p>The <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-size-adjust#browser_compatibility">font-size-adjust</a> property solves this exact issue by allowing you to adjust your fallback font to better match the font of choice. Regardless of the font used, the text should appear more similar in size improving the <a href="https://web.dev/articles/cls">CLS</a> as well. It might take some tries to find the proper value to use but the result might be worth it as seen in the example below.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fembed%2Fpreview%2FLYwKpYx%3Fdefault-tabs%3Dhtml%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DLYwKpYx&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fpen%2FLYwKpYx&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FLYwKpYx-512.jpg%3Fversion%3D1732094534&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b83589eefb4c01befcace4d3ca18bcf/href">https://medium.com/media/5b83589eefb4c01befcace4d3ca18bcf/href</a></iframe><blockquote>For all options, and how to properly calculate the values, please take a look at the <a href="https://developer.mozilla.org/docs/Web/CSS/font-size-adjust">MDN documentation</a>.</blockquote><h3>Reducing page load using content-visibility</h3><p>Since September of 2024, the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/content-visibility">content-visibility</a> property is supported by all three major browser engines. What does it do you ask? It lazy-renders targeted elements to speed up the initial render of a website. For complicated websites with very deep or long HTML, this can help improve the time to render thus increasing the rendering performance.</p><p>When using content-visibility, be aware of potential side effects. As you scroll, targeted elements are rendered on-the-fly which can cause the page&#39;s scrolling height to change dynamically. <strong>This may result in a jittery scroll bar experience.</strong></p><p>However, you can mitigate this issue using the contain-intrinsic-size property. This acts as a placeholder height, maintaining a smooth scrolling experience until the actual DOM is fully rendered. You can take a look at the example below for a better understanding.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fembed%2Fpreview%2FmdNZVpb%3Fdefault-tabs%3Dhtml%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DmdNZVpb&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fpen%2FmdNZVpb&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FmdNZVpb-512.jpg%3Fversion%3D1732100679&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/80ed8a22d10bfc5058c7ce836d090fad/href">https://medium.com/media/80ed8a22d10bfc5058c7ce836d090fad/href</a></iframe><h3>CSS type-checking</h3><p>You read that right — we can do a type-checking in CSS now. Everyone already knows CSS custom properties. They can be declared either in the :root or scoped within any selector. However, this way the browser doesn’t know what type the property is so you can reassign it freely to any other unit, and because of that, you are not able to animate it either.</p><p>You can now use <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@property">@property</a>rule which solves this issue by defining the property type and you can specify a default value as well. More importantly, using this approach, you can also very easily animate the property by defining custom @keyframes as seen on the codepen below.</p><blockquote>If you try to reassign the property to a value with different type, it just simply won’t work and the aplied CSS rule will be ignored by the browser.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fembed%2Fpreview%2FXWvLmMd%3Fdefault-tabs%3Dcss%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DXWvLmMd&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Ftimoransky%2Fpen%2FXWvLmMd&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FXWvLmMd-512.jpg%3Fversion%3D1732095111&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc209334ce837cf301f0010f15ec1019/href">https://medium.com/media/fc209334ce837cf301f0010f15ec1019/href</a></iframe><h3>Math functions in CSS</h3><p>CSS now comes equipped with a powerful set of math functions. Most of them were brought to the Baseline 2024 in May and they bring access to the very much-needed calculations. They provide powerful mathematical capabilities directly in CSS, allowing for more dynamic styling without relying on JavaScript, which is great news for all the CSS properties-driven animations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*GvQE-jD0XUsGRpAFkJs31g.gif" /></figure><h4>The round() function</h4><p>As you probably already guessed from the name, it rounds the value based on the parameters. The first parameter is the value you want to round and the second parameter is the rounding precision. That’s 1 by default, but can be adjusted based on the property. For example, while rounding opacity, you would prefer a precision of 0.1 instead of 1.</p><p>By default, the nearest strategy will be used:</p><pre>font-size: round(12.3rem, 1rem); /* Returns 12rem */</pre><p>There is also a third parameter, at the start, which specifies the rounding strategy. The default is nearest but you can use either one of these:</p><ul><li>up - rounds the value up, based on the rounding precision. Its JS equivalent is Math.ceil()</li><li>down - rounds the value down, based on the rounding precision. Its JS equivalent is Math.floor()</li><li>nearest - rounds the value either up or down, based on rounding precision. Its JS equivalent is Math.round()</li><li>to-zero - works very similar to the down strategy, but rounds the value up for negative numbers. It will simply round to the interval number that is closest to zero.</li></ul><pre>rotate: round(up, -83deg, 45deg); /* -45deg */<br>rotate: round(down, -83deg, 45deg); /* -90deg */<br>rotate: round(nearest, -83deg, 45deg); /* -90deg */<br>rotate: round(to-zero, -83deg, 45deg); /* -45deg */</pre><h4>The rem() function</h4><p>The rem() function calculates the remainder of a division operation, just like the % operator in JavaScript. The value will always take the sign of the dividend (the first parameter).</p><pre>margin-left: rem(32px, 5px); /* Returns 2px */<br>margin-left: rem(-32px, 5px); /* Returns -2px */<br>margin-left: rem(32px, -5px); /* Returns 2px */<br>margin-left: rem(-32px, -5px); /* Returns -2px */</pre><h4>The mod() function</h4><p>The mod() function works similar to the rem(), but works slightly differently if the signs of the divisor and dividend are different. In that case, it looks for the multiple bigger than the dividend and returns the difference (note the example below). Also, compared to the rem(), result takes the sign of a divisor instead of a dividend.</p><pre>margin-left: mod(32px, 5px); /* Returns 2px */<br>margin-left: mod(-32px, 5px); /* Returns 3px */<br>margin-left: mod(32px, -5px); /* Returns -3px */<br>margin-left: mod(-32px, -5px); /* Returns -2px */</pre><h4>The pow() function</h4><p>The pow() function raises a number to a specified power. It takes two parameters: the base and the exponent. One thing to note is that this function only works with plain numbers without units. If you need to use it with units, you can do so by nesting it inside a calc function, like in the example below.</p><pre>font-size: pow(2, 3); /* Returns 8 */<br>font-size: calc(1rem * pow(2, 3)); /* Returns 8rem */</pre><h4>The sqrt() function</h4><p>The sqrt() function calculates the square root of a given number without a unit. It takes one parameter: the number you want to find the square root of.</p><pre>width: sqrt(64); /* Returns 8 */<br>width: calc(1rem * sqrt(64)); /* Returns 8rem */</pre><h4>Pi, infinity, and beyond</h4><p>CSS also provides some Math constants that can be used either with the new functions or simply by using calc. These are:</p><ul><li>pi - might be useful in combination with rotate, like this: rotate: calc(pi * 1rad);</li><li>infinity - is useful if you want the highest or lowest (-infinity) number possible, for example as a z-index: calc(infinity);</li><li>e - represents Euler’s number and can be used for calculations as well, if needed</li><li>NaN - Not a number constant, it can be returned as a result of a CSS function such as this one: rem(3, 0), but I’m not sure why and how you would want to use this 😅</li></ul><h3>Putting It All Together</h3><p>As you can see, modern CSS has evolved into a powerful toolkit that goes far beyond basic styling. The features we have explored today — from simplified centering to mathematical functions — show just how much can be accomplished with pure CSS now. And these are just the tip of the iceberg.</p><p>The CSS landscape is rich with other recent additions that have wide browser support: the game-changing :has selector, :empty for targeting empty tags, scroll-snap-type for creating CSS-only snapping animations, @container queries, and many more. And the evolution continues – new features like anchor-name, scroll-driven animations, and interpolate-size are already making their way into the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility">Baseline</a>.</p><p>What are your thoughts on these new CSS features? Drop a comment below to share your favorites, tell me which ones you’re missing, or suggest topics for my next deep dive!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39adbbd5c65b" width="1" height="1" alt=""><hr><p><a href="https://blog.meetbrackets.com/css-today-powerful-features-you-might-not-know-about-39adbbd5c65b">CSS Today: Powerful Features You Might Not Know About</a> was originally published in <a href="https://blog.meetbrackets.com/">BRACKETS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create Beautiful Admin Panel in Laravel]]></title>
            <link>https://blog.meetbrackets.com/create-beautiful-admin-panel-in-laravel-7d6b142f58cf?source=rss-e37d95900cf0------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d6b142f58cf</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Ján Timoranský]]></dc:creator>
            <pubDate>Fri, 14 Apr 2023 14:40:46 GMT</pubDate>
            <atom:updated>2023-04-14T14:40:46.808Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pLGSj9Uo7pzV7GvTUd6qwA.png" /></figure><p><a href="https://craftable.pro/">Craftable PRO</a> is a powerful admin panel and CRUD generator that utilizes the <a href="https://viltstack.dev/">VILT stack</a> (VueJs, InertiaJs, Laravel, and TailwindCSS). With Craftable PRO, you can quickly scaffold administration for your Laravel project and harness its out-of-the-box features such as user administration, permissions management, media library, and much more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P2eFGVqfQyl2A4pAbrNWVQ.png" /></figure><p>By automating the tedious and repetitive tasks of creating CRUD interfaces for your models, Craftable PRO allows you to save time and costs while focusing on the exciting aspects of your project. Say goodbye to never-ending boilerplate programming and let Craftable PRO have your back!</p><p>You can try it out yourself on our public <a href="https://demo.craftable.pro/">demo</a> or you can get a <a href="https://craftable.pro/#trial">free trial license</a> and have a more in-depth hands-on experience.</p><h3>Installation</h3><p>The installation process for Craftable PRO is straightforward. Once you have obtained a license key, whether it is free or paid, simply refer to the official <a href="https://docs.craftable.pro/getting-started/installation">documentation</a> for guidance on the few necessary commands.</p><p>After running Vite, you can navigate to Craftable PRO’s default URL /admin in your web browser, which will redirect you to the login page. Use the credentials provided by the installation command to log in and you should be able to see the dashboard. With these simple steps, you can start extending the default Craftable PRO installation using the CRUD generator right away.</p><h3>Built-in features</h3><p>Craftable PRO ships with some helpful features already built in to help you start working on your project with the least hustle. Let’s look into detail at some of them.</p><h4>CRUD generator</h4><p>CRUD generator is a very strong Craftable PRO feature, which allows you to easily generate the whole administration based on your database structure. It does so with its robust craftable-pro:generate-crud artisan command, which is really easy to use, and still offers a variety of customization.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FoI6vcB4c26A%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DoI6vcB4c26A&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FoI6vcB4c26A%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1e3c3dad3cb7d4459631c801d953c457/href">https://medium.com/media/1e3c3dad3cb7d4459631c801d953c457/href</a></iframe><p>The real magic happens when you run the command with the <a href="https://docs.craftable.pro/commands/crud-generator-command#wizard-mode">wizard option</a> (craftable-pro:generate-crud --wizard). This will guide you through every option so you can really customize the output, not only specifying which table columns should be visible in the listing, but you can also register relationships or specify media collections.</p><p>You can read more about the generator command in an in-depth <a href="https://medium.com/brackets/building-laravel-9-admin-panel-with-craftable-pro-f4d7a60594db">article published on our blog</a>, where we demonstrate it on a real-world example project.</p><p>All generated files live in your project folder structure so you can customize them as you wish. You can change the layout of the generated form, swap input components for a better user experience or simply edit anything you want to suit your use case.</p><p>We think this is the main difference between Craftable PRO and its competitors —you are completely in charge, you have absolute freedom and you can customize or change anything to fit your needs.</p><h4>Users management</h4><p>In Craftable PRO, you can manage all users out of the box, with the ability to directly invite more users via email. There is also a self-registration feature, which allows users to register manually. You can learn more about this in the documentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QXH__oPHuc3YlOQQA05KbA.png" /></figure><h4>Permissions management</h4><p>Craftable PRO has the ability to manage permissions for all roles within your project. This way you can quickly add or remove permissions to certain roles to access only certain features. Everything is prepared for additional roles, you just need to add them to your database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Es1XJiQJyiLStWARPrLexA.png" /></figure><h4>Translations management</h4><p>With this feature, you have all the translations right at the tips of your fingers. You can scan your project codebase for translatable strings and edit them directly within this screen. Need to support more languages? Just add another locale on the settings and you are good to go, without the need to edit any configs. You can publish the translations into a publicly accessible file which can be read by your mobile or frontend application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AmnbxSCa9-mehegCXkka4Q.png" /></figure><h3>Did someone say AI?</h3><p>Recently, we have prototyped the use of AI to further accelerate the CRUD generator in Craftable PRO. Our aim is to enable developers to simply describe their desired admin panel in natural language, and let the AI handle the rest. The advantage of this approach is that we do not rely solely on the output of the AI, but rather use it to generate specific generator commands with all the available options. This not only speeds up the development process but also provides developers with greater flexibility and control over the generated code.</p><blockquote>“Just describe the admin panel in natural language, and let the AI handle the rest” — Pavol Perdik on integrating GPT-4 into Craftable PRO</blockquote><h3>Craftable PRO on Twitter: &quot;From English to a working admin panel. We&#39;re gearing up a new AI-powered solution, designed to create #Laravel admin panels accessible to all. Let GPT-4 do the trick - just give it a prompt &amp; watch the magic! ✨🧙‍♂️Stay updated: https://t.co/huyQHsGLhu pic.twitter.com/Kk0rsbollv / Twitter&quot;</h3><p>From English to a working admin panel. We&#39;re gearing up a new AI-powered solution, designed to create #Laravel admin panels accessible to all. Let GPT-4 do the trick - just give it a prompt &amp; watch the magic! ✨🧙‍♂️Stay updated: https://t.co/huyQHsGLhu pic.twitter.com/Kk0rsbollv</p><p>If you’re interested in leveraging the power of AI to accelerate your CRUD development process in Craftable PRO, you can visit our <a href="https://craftable.pro/ai">website</a>. By subscribing to our newsletter, you’ll be among the first to know when this feature becomes available and can start using it to streamline your development workflow.</p><h3>Get 30% off with Laravel News Today</h3><p>Use the coupon code LARAVELNEWS30 to get a 30% discount on our <em>Unlimited license</em>. Just visit our <a href="https://craftable.pro/#pricing">website</a> and redeem your coupon before the end of this month (April 30, 2023).</p><p>Not convinced yet? Feel free to try our <a href="https://craftable.pro/#trial">Trial license</a> first!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d6b142f58cf" width="1" height="1" alt=""><hr><p><a href="https://blog.meetbrackets.com/create-beautiful-admin-panel-in-laravel-7d6b142f58cf">Create Beautiful Admin Panel in Laravel</a> was originally published in <a href="https://blog.meetbrackets.com/">BRACKETS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Laravel 9+ admin panel with Craftable PRO]]></title>
            <link>https://blog.meetbrackets.com/building-laravel-9-admin-panel-with-craftable-pro-f4d7a60594db?source=rss-e37d95900cf0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4d7a60594db</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[cms]]></category>
            <category><![CDATA[crm]]></category>
            <dc:creator><![CDATA[Ján Timoranský]]></dc:creator>
            <pubDate>Thu, 09 Feb 2023 13:42:52 GMT</pubDate>
            <atom:updated>2023-03-20T14:08:00.403Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uq2GyXFwp9PgCQxsLkT5Gg.png" /></figure><h3>Building Laravel 10 administration panel with Craftable PRO</h3><p>Recently we have published <a href="http://craftable.pro/">Craftable PRO</a>, the successor to our popular open-source package called <a href="http://getcraftable.com/">Craftable</a>. Craftable PRO is built from the ground up with the use of TailwindCSS, Vue3, and InertiaJS. It&#39;s packed with many new features out of the box including a more advanced CRUD generator.</p><p>In this article, I will dive into all the features so you can see how easy and fast it is to generate the whole admin panel for your Laravel project. I will create an example project from scratch with the end result of the admin panel with the administration of authors and articles. So sit back and follow along.</p><p><strong>UPDATE 2023–02–14: </strong>Originaly this article was titled <em>Building Laravel 9 administration panel with Craftable PRO</em> before Laravel 10 was released. Both versions are fully supported with Craftable PRO.</p><h3>Creating a new Laravel project</h3><p>This is basic stuff for anyone even slightly experienced in Laravel. Just follow the <a href="https://laravel.com/docs/9.x/installation">official documentation</a>. In this article, I will install Laravel with Sail and PostgreSQL instead of MySQL, since that&#39;s my go-to database.</p><pre>curl -s &quot;https://laravel.build/craftable-pro-example?with=pgsql&quot; | bash</pre><h3>Installing Craftable PRO</h3><p>Next, we will install Craftable PRO. If you don’t have your license yet, head to <a href="http://craftable.pro/#pricing">craftable.pro</a> and buy one yourself. You can use <strong>EARLYBIRD</strong> discount for 30% off until the end of this March. After obtaining your license you have to tell the composer to use our private repository before requiring the Craftable PRO composer package.</p><pre>&gt; composer config repositories.craftable-pro composer https://packages.craftable.pro<br>&gt; composer require brackets/craftable-pro</pre><p>Finally, you can run our install command which will publish all required files and prepare your project. Don’t forget to install npm packages afterward.</p><pre>&gt; sail artisan craftable-pro:install<br>&gt; npm install</pre><p>Everything above is well documented in our documentation on <a href="http://docs.craftable.pro/">docs.craftable.pro</a> as well, so if you have any issues with the installation, you can follow our more in-depth step-by-step guide there.</p><h3>Preview of craftable pro</h3><p>After running Vite with npm run craftable-pro:dev, we can log into Craftable PRO at https://localhost/admin and you should see the default interface with features that Craftable PRO ships with. Each sidebar item is explained in our docs at <a href="http://docs.craftable.pro/">docs.craftable.pro</a>, so feel free to take a step back from this article at this point and play around to see what Craftable PRO has to offer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z-8eaTVh8AA7-rPoFVIyEg.png" /><figcaption>Default Craftable PRO interface</figcaption></figure><p>But this, of course, isn’t satisfactory for my needs in this example project so I will extend this admin panel to include the administration of authors and their articles.</p><h3>Creating migrations</h3><p>The first step is to create migration for our models. These migrations will be fundamentals for our CRUD generator in the next step.</p><p>I choose to create the migration for authors table with just the name and email address. The migration can look like this:</p><pre>&lt;?php<br><br>use Illuminate\Database\Migrations\Migration;<br>use Illuminate\Database\Schema\Blueprint;<br>use Illuminate\Support\Facades\Schema;<br><br>return new class extends Migration<br>{<br>    public function up()<br>    {<br>        Schema::create(&#39;authors&#39;, function (Blueprint $table) {<br>            $table-&gt;id();<br><br>            $table-&gt;string(&#39;name&#39;);<br>            $table-&gt;string(&#39;email&#39;);<br><br>            $table-&gt;timestamps();<br>            $table-&gt;softDeletes();<br>        });<br>    }<br>}</pre><p>Next let’s create the articles table. This one is gonna be a little more complex since I want the article’s title and content to be translatable. To do so all I have to do is define those columns as jsonb. I will also want to assign an article to the author, so I will create a foreign key column author_id to reference the id column on the authors table. And I also want the article to be publishable so I will include published_at column. The final migration can look like this:</p><pre>&lt;?php<br><br>use Illuminate\Database\Migrations\Migration;<br>use Illuminate\Database\Schema\Blueprint;<br>use Illuminate\Support\Facades\Schema;<br><br>return new class extends Migration<br>{<br>    public function up()<br>    {<br>        Schema::create(&#39;articles&#39;, function (Blueprint $table) {<br>            $table-&gt;id();<br>            <br>            $table-&gt;jsonb(&#39;title&#39;);<br>            $table-&gt;jsonb(&#39;content&#39;);<br><br>            $table-&gt;foreignId(&#39;author_id&#39;)-&gt;constrained(&#39;authors&#39;);<br>            $table-&gt;dateTime(&#39;published_at&#39;)-&gt;nullable();<br><br>            $table-&gt;timestamps();<br>            $table-&gt;softDeletes();<br>        });<br>    }<br>}</pre><p>After verifying that everything is as I want, I will run the migrations using sail artisan migrate command.</p><h3>Generating authors CRUD</h3><p>In this step, I will generate CRUD for authors table using our generator command. Since it&#39;s a fairly simple model with just a few columns I will define some of the command options inline. I definitely want our authors to have avatars, so I will include --media-collections and --image-collections options. All the possible options are explained in our docs at <a href="https://docs.craftable.pro/commands/crud-generator-command">docs.craftable.pro/commands/crud-generator-command</a>.</p><pre>&gt; sail artisan craftable-pro:generate-crud authors --media-collections=avatar --image-collections=avatar</pre><h3>Preview of the authors CRUD</h3><p>After running the generate command about, we can preview the authors CRUD on https://localhost/admin/authors. Here you can create, edit, search, and delete authors. Everything is built-in and ready for you to use. Here is an example of what you might see as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IRa4zFvWRG4hATO5odEqjA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n00Jej4xnuMN9WHSlGESdw.png" /><figcaption>Generated authors listing and form</figcaption></figure><h3>Generating articles CRUD</h3><p>We have our authors but now we need to generate CRUD for articles as well. Since this table is more complex I will use the wizard option of our generator command to guide me through every possible option.</p><p>I can start the wizard either by just running the command without any arguments like this…</p><pre>&gt; sail artisan craftable-pro:generate-crud</pre><p>… or by specifying the table name and the -w option like this:</p><pre>&gt; sail artisan craftable-pro:generate-crud articles -w</pre><p>First, the generator will ask which columns we want to see on the listing page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H8r4cr-AWokPCEJG7rYNGQ.png" /><figcaption>I selected every option except content</figcaption></figure><p>Next, we can select which of those should be sortable. We will leave this empty to use the default value which is all of the columns selected in the previous step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H3EeTmUheDv4PbTiIpUatA.png" /><figcaption>Leave the answer empty to apply default options</figcaption></figure><p>Next, we can select which columns we want to be able to edit on the form page. We will again use the default value because we want to edit all of the available columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TGcQDn4Tl2K8Yfpjjs9uJg.png" /></figure><p>Since I specified title and content as jsonb columns, they are automatically detected as translatable columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PxOoRqsoTJJc_UhbPfffpA.png" /></figure><p>In the next question, I can decide if I have a column with the publishable feature. By selecting my published_at column, I will get the ability to publish articles directly from the listing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UFClSYZ3cPsqJca15nf_HA.png" /></figure><p>Similar to authors table, I can now define media collections for the Article model. Defining collection as an image is helpful to automatically generate preview thumbs for all my uploaded media.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ccrKQgesyVgt2GNNR7uKg.png" /></figure><p>The next series of questions will ask the details about the relations I want to define for the Article model. Since we included author_id column in our migration, we will define the relation accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5eHxMuw9Vz75VBod1K4jJQ.png" /><figcaption>After registering your first relationship, you can register more of them</figcaption></figure><p>Finally, the wizard will ask you whether you want to use the export feature for your model. If you decide to do so, it will generate all the needed code to export your records into an excel table. I selected not to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5oEVF5ORZyAWJ0ziZpDXPw.png" /></figure><h3>Preview of the articles CRUD</h3><p>Again, after successfully running generator command, I should be able to visit <a href="https://localhost/admin/articles">https://localhost/admin/articles</a> to preview generated CRUD for my articles table. As you can see, there are already a lot more features present than in the authors module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_QDh0KjvWv1qp78bVC-9Lg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ATonOFs-5gH-CvuxkskaaQ.png" /><figcaption>Generated articles listing and form</figcaption></figure><h3>Beyond generated code</h3><p>After quickly creating some dummy data, we can see everything works nicely together without the need to modify generated code. But you can always deep dive and modify everything to your needs. And that&#39;s the beauty of Craftable PRO. So let&#39;s do just that and change some things to further improve our admin panel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v_dbtwAiZtA_O4dGfarc1A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*blkwCyzt12UNjR9Hk-KmiQ.png" /></figure><h4>Changing sidebar icons</h4><p>By default, all generated sidebar items have the same generic icon, which is fine, but I want something more recognizable. I can use whatever icon I wish, but since we ship Craftable PRO with <a href="https://heroicons.com/">Heroicons</a>, I will choose some from their collection. You can edit the Sidebar.vue component located in resources/js/craftable-pro/Components.</p><pre>&lt;template&gt;<br>  ...<br>  &lt;SidebarItem<br>      :href=&quot;route(&#39;authors.index&#39;)&quot;<br>      :icon=&quot;UserGroupIcon&quot;<br>      v-can=&quot;&#39;craftable-pro.author.index&#39;&quot;<br>  &gt;<br>      {{ $t(&quot;craftable-pro&quot;, &quot;Authors&quot;) }}<br>  &lt;/SidebarItem&gt;<br>  &lt;SidebarItem<br>      :href=&quot;route(&#39;articles.index&#39;)&quot;<br>      :icon=&quot;NewspaperIcon&quot;<br>      v-can=&quot;&#39;craftable-pro.article.index&#39;&quot;<br>  &gt;<br>      {{ $t(&quot;craftable-pro&quot;, &quot;Articles&quot;) }}<br>  &lt;/SidebarItem&gt;<br>  ...<br>&lt;/template&gt;<br><br>&lt;script setup lang=&quot;ts&quot;&gt;<br>import {<br>    UserGroupIcon,<br>    NewspaperIcon,<br>} from &quot;@heroicons/vue/24/outline&quot;;<br>...<br>&lt;/script&gt;</pre><h4>Improving listings to include avatars</h4><p>First, you need to add the attribute to your model with a link to their avatar, for example like this:</p><pre>class Author extends Model implements HasMedia<br>{<br>    // ...<br><br>    protected $appends = [&#39;avatar_url&#39;];<br><br>    protected function avatarUrl(): Attribute<br>    {<br>        return Attribute::make(<br>            get: fn ($value) =&gt; $this-&gt;getFirstMediaUrl(&#39;avatar&#39;, &#39;thumb&#39;)<br>        );<br>    }<br>}</pre><p>Next, just open up generated Index.vue components for listings (these are located in resources/js/craftable-pro/Pages for each model) and edit ListingDataCell component to include the Avatar component as well. You can simply place it next to the author’s name like this:</p><pre>...<br>&lt;ListingDataCell&gt;<br>    &lt;div class=&quot;flex items-center gap-2&quot;&gt;<br>        &lt;Avatar<br>            :src=&quot;item.author.avatar_url&quot;<br>            :name=&quot;item.author.name&quot;<br>        /&gt;<br>        {{ item.author.name }}<br>    &lt;/div&gt;<br>&lt;/ListingDataCell&gt;<br>...</pre><h4>Adding more locales</h4><p>To translate articles into more languages, I can just go to the settings page and add more locales. I can even change the default locale which will be used for all newly created users. Afterward, I can create a new article or edit an existing one and all those languages are automatically available in the form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g-qTBhdEz8vkH7KS9ibgzw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oZra504egG04DH6k7CfGUw.png" /></figure><h4>Changing color theme</h4><p>Craftable PRO is built with TailwindCSS and it even has its own Tailwind config. And of course, you are welcome to change it to your liking including colors, fonts, and everything Tailwind has to offer. To change the default primary color, I can simply navigate to craftable-pro.tailwind.config.js and change primary color to something else, for example, amber, as it is my favorite color.</p><p>All of those changes above would give me the following result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HYdWMVUb8M1xTfK1m1dLzw.png" /></figure><h3>Closing thoughts</h3><p>I hope you enjoyed this little <em>getting-to-know</em> article. As you can see, using <a href="http://craftable.pro/">Craftable PRO</a> can really save so much of your time without taking away the ability to customize everything to the tiniest detail.</p><p>And this is just the tip of the iceberg since there is so much more including media management, roles and permissions management, access control, and more features to come such as 2FA or a built-in Pages module. We are really proud of our work and we cannot wait to introduce some more exciting features to you. Of course, until they are ready to ship, we will offer support and periodical updates with bug fixes and improvements.</p><p>If you have any questions, issues, or perhaps a request for a feature or custom component, please feel free to contact us on our <a href="https://github.com/BRACKETS-by-TRIAD/craftable-pro-docs">Github</a>, <a href="https://twitter.com/craftable_pro">Twitter</a>, or <a href="/service/mailto:support@craftable.pro">support@craftable.pro</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4d7a60594db" width="1" height="1" alt=""><hr><p><a href="https://blog.meetbrackets.com/building-laravel-9-admin-panel-with-craftable-pro-f4d7a60594db">Building Laravel 9+ admin panel with Craftable PRO</a> was originally published in <a href="https://blog.meetbrackets.com/">BRACKETS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>