vlados / laravel-unique-urls Goto Github PK
View Code? Open in Web Editor NEWA package for using and generating unique urls for each Eloquent model in Laravel
License: MIT License
A package for using and generating unique urls for each Eloquent model in Laravel
License: MIT License
Originally posted by vlados March 26, 2023
Currently we are getting only the first url for the current locale, but in some cases (like if we are using Filament PHP) if the current locale is not existing we want to return the fallback locale
Currently in the migration the slug is using string()
function which is setting the column to varchar(255)
Needs to be changed to text()
which not have limit
Create a new command in the package to generate all the urls for all models
Should have options:
--model= Specify only a model for which to execute the command
--only-missing Skip existing urls
--fresh Truncate table urls and generate fresh for every model
This will create in the database multiple redirects to the page
If the user go to /test-page he will be redirected multiple times (/test-page > /something-new > /latest-changes)
If the user go to /test-page he should be redirected only once times (/test-page > /latest-changes) or new-page > latest-changes
Create a new command in the package to check:
Should have options:
If the model don't have urls in the database the method generateUrlOnUpdate()
will not create this records
add an exception if the model has attribute or column called url
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.