title: How to delete some records or files after X time - Laravel 5
body: <p>I want to create a script, to delete some records after X time, I will choose it, but I don't know, How can I do that? 
  And the same thing with my files, I want to delete some files after X time from upload for example, and to do that, I will delete the file from my storage, and the file record from the database, <strong>but that will make my site slow</strong>, Any way to do that without problems</p>
  
  <p>Use this for example? </p>
  
  <p><a href="https://laravel.com/docs/5.7/eloquent#soft-deleting" rel="nofollow noreferrer">Soft Deleting</a> or <a href="https://laravel.com/docs/5.7/scheduling" rel="nofollow noreferrer">Task Scheduling</a></p>
  
  <p>My Table is: 
  <a href="https://i.stack.imgur.com/gkCod.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gkCod.png" alt="My Table Image"></a>
  so I want to delete this record for example after 2 hours from creation? but I have a lot of records? how to do that?</p>
  
  <p>Files Table :
  <a href="https://i.stack.imgur.com/e9pA8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e9pA8.png" alt="Files Table Part 1"></a>
  <a href="https://i.stack.imgur.com/J8EJW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J8EJW.png" alt="Files Table Part 2"></a>
  these are my records, they contain the path of my files, but every file will expire after 5 days from creation for example, so I will delete it from the path and delete there record from the database after that. but that will make the site very slow? any way to do that? </p>
  
  <p>Thanks :) </p>