amiiiiink / hello-world
A simple Hello World Laravel package
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/amiiiiink/hello-world
Requires
- php: ^8.2
- illuminate/support: ^9|^10|^11|^12
Requires (Dev)
- phpunit/phpunit: ^10.0
README
A simple Laravel package that returns a "Hello World" message.
This package is created for learning purposes and can be extended for more complex use cases.
📦 Installation
You can install the package via Composer:
composer require amiiiiink/hello-world
If you want to customize the message, you can publish the config file
php artisan vendor:publish --tag=hello-world-config
php artisan vendor:publish --tag="helloworld"
add
@import "../vendor/helloworld/helloworld.css";
into resources/css/app.css
then
npm install
then
npm run build
in web.php add below
Route::get('/hello-world', function () {
return view('helloworld::hello', [
'title' => 'سلام از پکیج',
'subtitle' => 'نسخهٔ جدید با Tailwind CSS'
]);
});
🚀 Usage
use VendorName\HelloWorld\Facades\HelloWorld;
echo HelloWorld::sayHello('amiiiiink');
// Output: Hello World
Helper Function
echo sayHello('amiiiiink');
// Output: Hello World
to find out helpers
php artisan package:generate-helpers