Download the PHP package iantoo/laravel-greeting-package without Composer

On this page you can find all versions of the php package iantoo/laravel-greeting-package. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-greeting-package

Laravel Greeting Package

Description

The Laravel Greeting package is a lightweight, customizable package that provides personalized greeting messages based on the time of the day. It automatically detects the current time and delivers and appropriate greeting in either English of Kiswahili. If a user is logged in, the greeting is personalized with their first name or email.

Features

  1. Time based greetings
  2. User personalization
  3. Multilanguage support
  4. Artisan Command
  5. Easy Integration

Use Cases

Installation

  1. Install the Package:

    • Add the package to your Laravel project using Composer:

    • If you are developing the package locally, include it in your composer.json file under the repositories section:

    • Then run:

Configuration

  1. Publish Configuration (Optional):

    • Publish the package's configuration file to your application's config directory:
  2. Publish Language Files (Optional):

    • Publish the package's language files to your application's resources/lang directory:
  3. Set the Application Locale (Optional):

    • To use Kiswahili for greetings, set the application's locale to sw in your .env file or config/app.php:

Usage

  1. Display a Greeting in a View:

    • Use the Greeting::greet() method to display a greeting message in any Blade view:
  2. Test the Greeting via Artisan Command:

    • Run the custom Artisan command to test the greeting output:

    • This command will output a greeting message in the console based on the current time and the logged-in user's status.

Example Usage: Greetings

In a Controller:

In a Blade View:


Example Usage: Current Date

To display the current date using the currentDate() method from the Laravel Greeting Package, follow these steps:

Usage Example

1. Using in a Blade View

If you want to display the current date in a Blade view, you can call the currentDate() method directly in the view.

Output:

2. Using in a Controller

You can also use the currentDate() method within a controller and pass the result to your view.

And in your Blade view:

3. Using in an Artisan Command

If you need to use the currentDate() method in a custom Artisan command, it can be easily integrated.

To run the command:

Output:

Conclusion

By using the currentDate() method in your Blade views, controllers, or custom Artisan commands, you can easily display the current date in a formatted manner (including the day of the week, month, day in numbers, and year) within your Laravel application. This method is flexible and can be used wherever you need to display the date.


Advanced Usage

  1. Customizing Greetings:

    • Modify the published configuration or language files to customize the greeting messages.
  2. Adding More Languages:

    • Add new language files in the resources/lang directory under the appropriate locale code to support additional languages.

Deployment


All versions of laravel-greeting-package with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^11.20
illuminate/console Version ^11.20
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package iantoo/laravel-greeting-package contains the following files

Loading the files please wait ....