PHP code example of mantas-done / laravel-sparkles
1. Go to this page and download the library: Download mantas-done/laravel-sparkles library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mantas-done / laravel-sparkles example snippets
user();
ip();
delete($user->comments);
// equals to this
foreach ($user->comments as $comment) {
$comment->delete();
}
delete($user->profilePicture);
// equals to
if ($user->profilePicture) {
$user->profilePicture->delete();
}
forceDelete($user->comments);
// equals to this
foreach ($user->comments as $comment) {
$comment->forceDelete();
}