Link Expiry feature#378
Conversation
| $custom_ending = $request->input('custom-ending'); | ||
| $is_secret = ($request->input('options') == "s" ? true : false); | ||
| $is_expried = ($request->input('is_expried') == 'yes' ? true : false); | ||
| $expried_date = isset($request->input('expried_date'))?Carbon::parse(date_format($request->input('expried_date'),'Y-m-d')); |
There was a problem hiding this comment.
I think you can use $request->has() here
|
|
||
| try { | ||
| $short_url = LinkFactory::createLink($long_url, $is_secret, $custom_ending, $link_ip, $creator); | ||
| $short_url = LinkFactory::createLink($long_url, $is_secret, $custom_ending, $link_ip, $creator,false,false$is_expried,$expried_date); |
There was a problem hiding this comment.
There should be space between these params.
|
|
||
| } | ||
|
|
||
| ->first(); |
There was a problem hiding this comment.
The alignment of this block looks a bit strange, maybe reformat it?
| $table->boolean('is_custom')->default(0); | ||
| $table->boolean('is_api')->default(0); | ||
| $table->boolean('is_expried')->default(0); | ||
| $table->date('expried_date')->nullable(); |
There was a problem hiding this comment.
I think this should be expiry_date or expires_at
There was a problem hiding this comment.
Also, this should be in a new migration so existing users can get the functionality
| </div> | ||
| @endif | ||
|
|
||
| <p>Link Expried ?</p> |
There was a problem hiding this comment.
This layout is quite wonky. Let's fix the grammatical errors here and figure out a way to better lay these settings out. What about a modal for "advanced settings" or a horizontal grid layout for each specific link setting?
cydrobolt
left a comment
There was a problem hiding this comment.
Fix layout & other PR issues.
|
Hi, |
|
Just in case someone is looking for an expiry feature. Check out this pull request: #615 |
I am adding link expiry feature for valid the link upto certain time and provide option, the link do not expiry