PHP 8.3.31
Preview: CompilesAuthorizations.php Size: 2.44 KB
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesAuthorizations.php

<?php

namespace Illuminate\View\Compilers\Concerns;

trait CompilesAuthorizations
{
    /**
     * Compile the can statements into valid PHP.
     *
     * @param  string  $expression
     * @return string
     */
    protected function compileCan($expression)
    {
        return "<?php if (app(\Illuminate\\Contracts\\Auth\\Access\\Gate::class)->check{$expression}): ?>";
    }

    /**
     * Compile the cannot statements into valid PHP.
     *
     * @param  string  $expression
     * @return string
     */
    protected function compileCannot($expression)
    {
        return "<?php if (app(\Illuminate\\Contracts\\Auth\\Access\\Gate::class)->denies{$expression}): ?>";
    }

    /**
     * Compile the canany statements into valid PHP.
     *
     * @param  string  $expression
     * @return string
     */
    protected function compileCanany($expression)
    {
        return "<?php if (app(\Illuminate\\Contracts\\Auth\\Access\\Gate::class)->any{$expression}): ?>";
    }

    /**
     * Compile the else-can statements into valid PHP.
     *
     * @param  string  $expression
     * @return string
     */
    protected function compileElsecan($expression)
    {
        return "<?php elseif (app(\Illuminate\\Contracts\\Auth\\Access\\Gate::class)->check{$expression}): ?>";
    }

    /**
     * Compile the else-cannot statements into valid PHP.
     *
     * @param  string  $expression
     * @return string
     */
    protected function compileElsecannot($expression)
    {
        return "<?php elseif (app(\Illuminate\\Contracts\\Auth\\Access\\Gate::class)->denies{$expression}): ?>";
    }

    /**
     * Compile the else-canany statements into valid PHP.
     *
     * @param  string  $expression
     * @return string
     */
    protected function compileElsecanany($expression)
    {
        return "<?php elseif (app(\Illuminate\\Contracts\\Auth\\Access\\Gate::class)->any{$expression}): ?>";
    }

    /**
     * Compile the end-can statements into valid PHP.
     *
     * @return string
     */
    protected function compileEndcan()
    {
        return '<?php endif; ?>';
    }

    /**
     * Compile the end-cannot statements into valid PHP.
     *
     * @return string
     */
    protected function compileEndcannot()
    {
        return '<?php endif; ?>';
    }

    /**
     * Compile the end-canany statements into valid PHP.
     *
     * @return string
     */
    protected function compileEndcanany()
    {
        return '<?php endif; ?>';
    }
}

Directory Contents

Dirs: 0 × Files: 21

Name Size Perms Modified Actions
2.44 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
446 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
413 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
6.46 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
9.27 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
4.52 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
933 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
729 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1.56 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
2.38 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
505 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
447 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
725 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
3.01 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
4.82 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
620 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1013 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
2.73 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
443 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1.03 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
532 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).