mabasic

mabasic

Member Since 5 Years Ago

Murter

IT Manager at Laravelista

Experience Points 13,865
Experience Level 3

1,135 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 285
Lessons
Completed
Best Reply Awards 5
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

21 Jan
3 months ago

mabasic left a reply on Selecting Elements In Laravel Dusk

@MONAHAJT - SInce I am the author of the post above :)

Laravel Dusk comes with an undocumented feature which enables you to execute JavaScript code on the page that you are testing.

"Why would this be useful?" - you may ask yourself.

Because if you are like me using selectize.js in your application for select boxes, then this is a real life saver.

If you are using selectize.js, and in your test file you have:

$browser->select('book_id', 'Book name')

it won't work.

Because selectize.js hides the select element using style="display:none" and removes options from it. Then, when Laravel Dusk comes to select an option, it does nothing.

That is why you need to use this code to select an option on the selectize.js element:

$browser->script("document.getElementById('book_id').selectize.setValue('". $book->id ."');");

Be sure to ensure that your select element has an ID of book_id (this example). Also, be sure to run the above line outside your usual $browser-> code, because it returns an array on which you cannot continue chaining.

This makes perfect sense to me, but let me know if you have an easier way for this to work.

05 Jan
3 years ago

mabasic left a reply on Getting One Record From Array

You could use first() instead of get() or use pluck('id')

15 Dec
3 years ago

mabasic left a reply on Where Should I Put Hits?

Create a class called VenueTransformer and place those methods there.

21 Sep
3 years ago

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

@layer7 I think that using SMB should fix the problem, but unfortunately Windows 10 has issues with smb and vagrant atm. I'm hoping that newer versions of vagrant and virtualbox will solve this issue.

19 Sep
3 years ago

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

@Shovels I see.. I will probably wait for newer virtualbox releases in hopes that this gets resolved.

@toniperic Pozdrav :)

To answer both of your questions and not turn this into a Linux vs Windows discussion :)

I have actually worked a lot on Linux desktops and servers. I like the linux eco system very much. If you are interested you can read more about it here: http://laravelista.com/reasons-why-not-to-switch-to-linux-yet/

I have worked on Windows since Windows 95 and somehow I feel at home with it. I know almost everything there is on it and since Windows 10, for me it is the best looking OS with a lot of good and useful software.

But don't get me wrong. If Linux manages to produce something similar that can run apps without vine then I will make the switch. Read more on the blog.

18 Sep
3 years ago

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

I'm having problems using NFS for shared folder. It starts the winfs command line program and then it just stands there doing nothing.

mabasic left a reply on How To Test Response->download To Download A PDF?

I will try this also. Need to test the same thing. But I would probably check that headers match conatain content type application/pdf

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

Guys. Finally some good news!!

I did what @layer7 suggested and copied the repo folder to a folder outside of the shared folder but inside the vm and then configured nginx to use that folder instead.

I am getting 58.55ms TTFB. This is great!!!

Now we have confirmed that the main issue is the shared folder in virtualbox for Windows 10.

Next I will try what @Shovels suggested and try to use NFS to see if that improves things.

17 Sep
3 years ago

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

Update I have not yet tried the suggestions from @layer7 and @Shovels but now my TTFB is 4.89s and stable xD

This is getting to be really annoying.

15 Sep
3 years ago

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

@layer7 I will try that and report back. Thanks for your input :)

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

So it seems that a fresh Laravel installation on my SSD (host machine) has TTFB 285ms. BTW my SSD can read 480MB/sec. 6 cores that run at 4.0GHz and 8GB of RAM. Why is this not faster??

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

@layer7 I have tried setting the values as in this chapter 12.3.7. Long delays when accessing shared folders but it does not make a difference.

I have copied the entire repository to a different SSD drive and changed the database to use sqlite. Then I ran php artisan server and with debugbar enabled it said:

Booting (254.75ms)
Application (67.56ms)
After application (17.47ms)

TTFB = 401ms

Then I disabled debugbar and all other service providers that I have installed, but noticed little change only. TTFB is now 338ms.

I don't get it. I have copied and ran the project on both SSD and HDD and they get the same TTFB speed. So the drive speed is not the issue, but I am worried why am I getting so long booting time.

Still from homestead I get TTFB around 1.5s.

I will try to use the NFS package you suggested and report back.

14 Sep
3 years ago

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

@layer7 I have tried pressing F5 non stop and checking top command. wa is always 0.0

But php5-fpm spawns 5 processes and each of them consumes 40% cpu.

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

@Shovels NFS is not supported on Windows.

Windows users: NFS folders do not work on Windows hosts. Vagrant will ignore your request for NFS synced folders on Windows.- Vagrant documentation

I considered switching to VMware Woekstation but it costs so damn much.

@jabba I have tried using top and free -m to check CPU and RAM usage. When the page refreshes CPU usage goes to almost 25% and RAM is steady at 900mb / 2048. I will install iotop to check drive usage.

@layer7 After using that command I get:

real    0m1.347s
user    0m0.007s
sys     0m0.011s
11 Sep
3 years ago

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

If I run php artisan serve from my host and visit http://localhost:8000 it has TTFB ~300ms. This feels fast already

Now debugbar reports:

Booting (333.42ms)

Application (77.17ms)

After application (19.77ms)

Why is booting taking so long?

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

I have debug bar installed and I checked timeline, it says:

Booting (421.82ms)

Application (392.5ms)

After application (106.11ms)

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

I've managed to get 1.16s.

This is my setup atm:

  • Windows 10 x64bit
  • Virtualbox 4.3.30
  • Vagrant 1.7.4
  • Homestead 2.1.7
  • Homestead box 0.2.7

My DNS servers are:

8.8.8.8 8.8.4.4

Homestead is running on 3 CPUs, 2048 MB RAM, SSD, IP: 192.168.10.10

My virtualbox adapter is on 192.168.10.1/255.255.255.0

I've setup homestead to send port 80 to port 80 on my host. Could that be the problem?

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

@jabba I tried using localhost, 127.0.0.1 and 192.168.10.10 , but I still get the same result.

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

@bashy I've just tried with Vaprobash and on a fresh laravel install I get 543ms

That is much better than 1.5s but still it seems high

I did traceroute and pinging the ips and always I get <1ms or less.

I have tried running the app with blackfire and it reports that @compiled_files takes 480ms.

I don't know where to look next..

10 Sep
3 years ago

mabasic left a reply on Codeception + PhantomJS Testing Url Problems

I haven't yet.

I suggest trying Integrated for testing using PhantomJS, maybe it is better there.

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

@bashy

I have tried deleting the VM and creating a new one .. still the same. I have tried accessing other Laravel projects on that VM .. still the same. I've only tested it in Chrome.

![http://d.pr/i/1kEZl]

Could it be a DNS issue? My host DNS is setup to use Google 8.8.8.8 and 8.8.4.4.

VM has an IP of 192.168.10.10 and my virtualbox adapter is on 192.168.10.1.

mabasic left a reply on Homestead TTFB > 2sec Issue .. Help

@mikebronner I am running Virtualbox 4.3.30

mabasic started a new conversation Homestead TTFB > 2sec Issue .. Help

I have noticed lately when working on my laravel projects locally it takes minimum 2sec to load the page.

Then I went to network tools in Chrome and noticed that TTFB (Time to first byte) takes 2 seconds while everything other happens in 1 milisecond or less.

I have tried reinstalling vagrant, homestead, virtualbox... I have updated homestead software to latest versions and the best I get is 1.50 seconds TTFB and now everything else happens in 0.5 mili seconds.

I am running WIndows 10 x64bit, 6 core CPU, 8GB RAM and homestead is running on SSD.

I have tested the application on the production server which has only 1 CPU and 512mb RAM and its TTFB is 350ms.

I expect that locally I should have somewhere near 1ms TTFB.

Does anyone have a clue what is going on?

If not, could you please post your TTFB here just to compare it.

09 Aug
3 years ago

mabasic left a reply on Windows 10 + Vagrant + Virtualbox + Homestead

@gregorio@latouraineinc.com It works with 5.0.1 with no compatibility options, but when i try to open VirtualBox GUI I get

Failed to open a session for the virtual machine homestead.

Callee RC: 
E_FAIL (0x80004005)

And I have to use port :8000, since port :80 is not being forwarded for some reason anymore.

04 Jun
3 years ago

mabasic left a reply on Laravel And Fractal

@ghst just replace mariobasic.com with laravelista.com like so: http://laravelista.com/laravel-fractal/

I am working on a new post for fractal and laravel. It will be ready in a few days.

29 Apr
4 years ago

mabasic left a reply on Combining Multiple Js Files In Assets Into One In Public

xD, I can just add ajax.js and notifications.js to the second scripts task and remove the first task.

mabasic left a reply on Combining Multiple Js Files In Assets Into One In Public

This is my setup:

mix.scripts([
        'ajax.js',
        'notifications.js'
    ], 'public/js/coffee.js', 'public/js');
mix.scripts([
        'handlebars.js',
        'coffee.js'
    ], 'public/js/bundle.min.js', 'public/js');

mabasic left a reply on Combining Multiple Js Files In Assets Into One In Public

If I try to do this:

elixir(function(mix) {
    mix.scripts(['jquery.js', 'something.js'], 'public/js/main.js')
       .scripts(['threads.js', 'main.js'], 'public/js/forum.js');
});

Last file in scripts main.js is not found even if it exists on disk.

Is there a way to resolve this?

10 Apr
4 years ago

mabasic left a reply on Laracasts Notifier Extension For Google Chrome

New version is now available from Google Chrome store

Screenshot

Give it a try and let me know what you think of it.

07 Apr
4 years ago

mabasic left a reply on Browserify + ES6 Goodness In Elixir Core

Also, it seems that you can't run multiple browserify tasks in the same build, it just runs the last one in the queue.

@catalin I am having the same issue with this.

I've opened a issue on github fot this: https://github.com/laravel/elixir/issues/103

06 Apr
4 years ago

mabasic left a reply on Laracasts Notifier Extension For Google Chrome

The extenstion has been renamed from Laracasts Notifier to Laranotti and I have been working on updating the code and fixing bugs. You can view the new design and progress on GitHub

26 Mar
4 years ago

mabasic left a reply on [Off Topic] Mac Or PC For Development

The perfect Windows PC for PHP development has this software:

  • chocolatey (virtualbox, vagrant, php, git ...)
  • homestead vm
  • cmder
  • Sublime Text or PHPStorm
  • Google Chrome

You don't need anything more than that.

Use chocolatey to install software like virtualbox, vagrant, git PHP. Then setup homestead vm and use TE or IDE for coding. Cmder is the best shell for Windows. It comes with ssh, git and has a lot of linux commands. As you use the terminal on Linux you can use Cmder; the commands are the same.;and you can also install it using chocolatey.

One thing that I did not like on Windows is the terminal. But since I discovered Cmder I fell in love.

25 Mar
4 years ago

mabasic left a reply on Codeception New Laravel5 Module Throwing Fatal Error

@aitiba Source: [https://github.com/Codeception/Codeception/pull/1750]

For all the people with problem with this issue:

Go to the root directory of your laravel application. Open this file: vendor/codeception/codeception/src/Codeception/Lib/Connector/Laravel5.php Comment line 67 with this content: $this->httpKernel->terminate($request, $response); After that line, add the following: $this->httpKernel->terminate(Request::createFromBase($request), $response); This way I fixed the issue.

The PR has been merged and will be released in version 2.0.12. You can apply the patch above until the 2.0.12 version is released.

Working Codeception version for L5 is: "codeception/codeception": "~2.0"

mabasic left a reply on Call To A Member Function Make() On Null

OMG :OOOO

Ok, I have managed to get it working.

Steps:

  • Update composer composer self-update
  • Delete composer cache located in AppData\Local\Composer
  • Delete composer global vendor folder: AppData\Roaming\Composer\vendor
  • Close all of your terminals, shells, command line programs
  • Start shell as administrator and run composer global update

Maybe the update composer and run shell as administrator parts were crucial. I really don't know why this worked now and before it did not.

mabasic started a new conversation Call To A Member Function Make() On Null

This is strange.

Same global composer dependencies on both PCs but running phpunit on one PC throws fatal error while running pphunit on another PC returns all tests green.

This is a fresh installation of L5. When working with L4 applications everything works on both PCs.

I will start from start. First the test:

<?php
class ExampleTest extends TestCase {
    /**
     * A basic functional test example.
     *
     * @return void
     */
    public function testBasicExample()
    {
        $response = $this->call('GET', '/');
        $this->assertEquals(200, $response->getStatusCode());
    }
}

Now my global composer dependencies:

{
    "require": {
        "laravel/installer": "~1.1",
        "laravel/envoy": "~1.0",
        "laravel/homestead": "~2.0",
        "phpunit/phpunit": "~4.0",
        "mabasic/kalista": "0.7.*",
        "codeception/codeception": "~2.0"
    }
}

Now the error I get on one PC:

PHPUnit 4.5.0 by Sebastian Bergmann and contributors.

Configuration read from F:\Repositories\hotelmurter\phpunit.xml

PHP Fatal error:  Call to a member function make() on null in F:\Repositories\hotelmurter\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php on line 164
PHP Stack trace:
PHP   1. {main}() C:\Users\Mario\AppData\Roaming\Composer\vendor\phpunit\phpunit\phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() C:\Users\Mario\AppData\Roaming\Composer\vendor\phpunit\phpunit\phpunit:36
PHP   3. PHPUnit_TextUI_Command->run() C:\Users\Mario\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\TextUI\Command.php:104
PHP   4. PHPUnit_TextUI_TestRunner->doRun() C:\Users\Mario\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\TextUI\Command.php:152
PHP   5. PHPUnit_Framework_TestSuite->run() F:\Repositories\hotelmurter\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:398
PHP   6. PHPUnit_Framework_TestSuite->run() F:\Repositories\hotelmurter\vendor\phpunit\phpunit\src\Framework\TestSuite.php:716
PHP   7. PHPUnit_Framework_TestCase->run() F:\Repositories\hotelmurter\vendor\phpunit\phpunit\src\Framework\TestSuite.php:716
PHP   8. PHPUnit_Framework_TestResult->run() F:\Repositories\hotelmurter\vendor\phpunit\phpunit\src\Framework\TestCase.php:693
PHP   9. PHPUnit_Framework_TestCase->runBare() F:\Repositories\hotelmurter\vendor\phpunit\phpunit\src\Framework\TestResult.php:609
PHP  10. Laracasts\Integrated\Extensions\Laravel->setUp() F:\Repositories\hotelmurter\vendor\phpunit\phpunit\src\Framework\TestCase.php:733
PHP  11. Illuminate\Foundation\Testing\TestCase->setUp() F:\Repositories\hotelmurter\vendor\laracasts\integrated\src\Extensions\IntegrationTrait.php:56
PHP  12. Illuminate\Foundation\Testing\TestCase->refreshApplication() F:\Repositories\hotelmurter\vendor\laravel\framework\src\Illuminate\Foundation\Testing\TestCase.php:27
PHP  13. TestCase->createApplication() F:\Repositories\hotelmurter\vendor\laravel\framework\src\Illuminate\Foundation\Testing\ApplicationTrait.php:38
PHP  14. Illuminate\Foundation\Console\Kernel->bootstrap() F:\Repositories\hotelmurter\tests\TestCase.php:16
PHP  15. Illuminate\Foundation\Application->bootstrapWith() F:\Repositories\hotelmurter\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:191
PHP  16. Illuminate\Foundation\Bootstrap\LoadConfiguration->bootstrap() F:\Repositories\hotelmurter\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:174
PHP  17. Illuminate\Foundation\Bootstrap\LoadConfiguration->loadConfigurationFiles() F:\Repositories\hotelmurter\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\LoadConfiguration.php:38
PHP  18. Illuminate\Foundation\Bootstrap\LoadConfiguration->getConfigurationFiles() F:\Repositories\hotelmurter\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\LoadConfiguration.php:55
PHP  19. Illuminate\Foundation\Bootstrap\LoadConfiguration->getConfigurationNesting() F:\Repositories\hotelmurter\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\LoadConfiguration.php:73
PHP  20. config_path() F:\Repositories\hotelmurter\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\LoadConfiguration.php:91

mabasic left a reply on [5.0] PHPUnit Inside Homestead

Does not help. I have tried deleting local vendor di and global vendor dir and deleting the composer cache but still it does not work.

On my second PC everything works with the exact same dependencies.

What is going on?

mabasic left a reply on PHPUnit Getting Started

You don't need to be inside vm to run tests ...

You just have to have php configured on your host to execute php files.

I am facing this exact problem but it works on my other PC.

Fresh install of L5 getting this error on phpunit:

PHP Fatal error:  Call to a member function make() on null in F:\Repositories\hotelmurter\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php on line 164

If I run phpunit on different PC the tests pass normal. Both PC's have same composer dependencies phpunit ~4.0.

Don't know what is going on. I have tried deleting vendor folder, deleting composer cache, but it still does not work on one PC, but it works on another.

23 Mar
4 years ago

mabasic left a reply on Laracasts Notifier Extension For Google Chrome

@mikebarwick It is very unlikely that i will build a version for safari atm, but given that enough people show interest in it I could reconsider doing it.

mabasic left a reply on Laracasts Notifier Extension For Google Chrome

@isimmons It needs permissions to read your browsing history because:

When you click on a lesson to watch in on laracasts from the Laracasts Notifier
it remembers that tab
and once that tab closes it marks that lesson watched

Hope that explains it. The feature seems a little buggy atm, but I hope that in the next release it will be more stable.

mabasic left a reply on Laracasts Notifier Extension For Google Chrome

Thank you all for your input.

I have opened issues on GitHub and will begin to solve them as I find time.

Most likely the new version will be released next week and all issues that are open on GitHub will be resolved, so if you find any issues please open a issue here; it would help me a lot.

13 Mar
4 years ago

mabasic left a reply on Laravel 5 DB Transactions

@ArkadeDev Yes, it appears that that was a problem before the official release, now everything works as expected.

18 Feb
4 years ago

mabasic left a reply on How To Migrate A Testing Database In Laravel 5?

I have considered your approach, but when using Laravel5 module for Codeception every functional test is run in transaction mode. So at the end of the test I still have clean database for the next test

Your approach does not fit me, because I am at a stage where I use migrations a lot. And if I add a new migration I would have to do a new mysql dump for each migration which becomes a waste of time.

17 Feb
4 years ago

mabasic left a reply on How To Migrate A Testing Database In Laravel 5?

I have found a workaround for this.

In your config/database.php bellow mysql add:

        'mysql_testing' => [
            'driver'    => 'mysql',
            'host'      => env('TESTING_DB_HOST', 'localhost'),
            'database'  => env('TESTING_DB_DATABASE', 'forge'),
            'username'  => env('TESTING_DB_USERNAME', 'forge'),
            'password'  => env('TESTING_DB_PASSWORD', ''),
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
            'strict'    => false,
        ],

And now in your .env add the values for:

TESTING_DB_HOST=localhost
TESTING_DB_DATABASE=homestead_testing
TESTING_DB_USERNAME=homestead
TESTING_DB_PASSWORD=secret

Now you can run

php artisan migrate --database=mysql_testing

And it will migrate your testing database.

mabasic started a new conversation How To Migrate A Testing Database In Laravel 5?

I have setup Codeception and Laravel 5 to work. And they work.

But now, I want to run codeception with a testing database, not local.

So in functional.suite.yml I have:

class_name: FunctionalTester
modules:
    enabled: [Filesystem, FunctionalHelper, Laravel5]
    config:
      Laravel5:
        environment_file: .env.testing

And that works. It loads the values from .env.testing and runs test on testing database.

The problem now is that I want to migrate the testing database before running the tests.

I do php artisan migrate --env=testing but that migrates my local database specified in .env file.

Is there a way to migrate a database different from one specified in .env ?

06 Feb
4 years ago

mabasic left a reply on Using Package Config Value In Service Provider

Thank you, I have got it working.

mabasic left a reply on Using Package Config Value In Service Provider

Yes, it's L4.

I am trying to add it to register method, but it does not seem to work in register or boot.

public function boot()
    {
        $this->package('basicit/down');

        include __DIR__ . '/../../routes.php';
    }
public function register()
    {
        App::down(function ()
        {
            return View::make('down::down');
        });
    }

mabasic started a new conversation Using Package Config Value In Service Provider

How can I use a value from config in service provider for that package.

I want to do something like: "If this value is set do that or if that value is set do that."

Any ideas?