03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Deployment 94<br />

21<br />

22 if ($type == "css")<br />

23 {<br />

24 $filters[] = new MinFilter("css");<br />

25 }<br />

26<br />

27 if ($type == "js")<br />

28 {<br />

29 $filters[] = new MinFilter("js");<br />

30 }<br />

31<br />

32 $collection = $this->getCollection($input, $filters);<br />

33 $combined = $collection->dump();<br />

34<br />

35 if ($output)<br />

36 {<br />

37 $this->line(trim("<br />

38 Successfully minified<br />

39 " . $input . "<br />

40 to<br />

41 " . $output . "<br />

42 .<br />

43 "));<br />

44<br />

45 $this->setOutput($output, $combined);<br />

46 }<br />

47 else<br />

48 {<br />

49 $this->line($combined);<br />

50 }<br />

51 }<br />

52<br />

53 protected function getArguments()<br />

54 {<br />

55 return [<br />

56 [<br />

57 "type",<br />

58 InputArgument::REQUIRED,<br />

59 "Code type."<br />

60 ],<br />

61 [<br />

62 "input",

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!